Skip to content

Commit

Permalink
fix: NavigationBar appearing too late
Browse files Browse the repository at this point in the history
  • Loading branch information
Ambrdctr committed Jan 25, 2023
1 parent 78aafe5 commit 604aa7c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Mail/Views/Thread/ThreadView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,15 @@ struct ThreadView: View {
MessageListView(messages: messages)
.padding(.top, 8)
.background(threadBackground)
.onAppear {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) {
withAnimation {
proxy.scrollTo(messages.last?.uid, anchor: .top)
}
}
}
}
}
.onAppear {
proxy.scrollTo(messages.last?.uid, anchor: .top)
}
}
.coordinateSpace(name: "scrollView")
.onPreferenceChange(ScrollOffsetPreferenceKey.self) { offset in
Expand Down

0 comments on commit 604aa7c

Please sign in to comment.