Skip to content

Commit

Permalink
fix: Feedback remove scrollTo
Browse files Browse the repository at this point in the history
  • Loading branch information
Ambrdctr committed Jan 25, 2023
1 parent 604aa7c commit cf20b6c
Showing 1 changed file with 13 additions and 21 deletions.
34 changes: 13 additions & 21 deletions Mail/Views/Thread/ThreadView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,29 +74,21 @@ struct ThreadView: View {
value: geometry.frame(in: .named("scrollView")).origin
)
}
.frame(width: 0, height: 0)
.frame(width: 0, height: 0)

Text(thread.formattedSubject)
.textStyle(.header2)
.frame(maxWidth: .infinity, alignment: .leading)
.multilineTextAlignment(.leading)
.lineSpacing(8)
.padding(.top, 8)
.padding(.bottom, 16)
.padding(.horizontal, 16)
.background(MailResourcesAsset.backgroundColor.swiftUiColor)
Text(thread.formattedSubject)
.textStyle(.header2)
.frame(maxWidth: .infinity, alignment: .leading)
.multilineTextAlignment(.leading)
.lineSpacing(8)
.padding(.top, 8)
.padding(.bottom, 16)
.padding(.horizontal, 16)
.background(MailResourcesAsset.backgroundColor.swiftUiColor)

MessageListView(messages: messages)
.padding(.top, 8)
.background(threadBackground)
.onAppear {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) {
withAnimation {
proxy.scrollTo(messages.last?.uid, anchor: .top)
}
}
}
}
MessageListView(messages: messages)
.padding(.top, 8)
.background(threadBackground)
}
}
.coordinateSpace(name: "scrollView")
Expand Down

0 comments on commit cf20b6c

Please sign in to comment.