Scroll to top of event instead of bottom

This is pretty important for longform events

Changelog-Changed: Start at top when reading longform events
This commit is contained in:
William Casarin
2023-07-11 12:55:54 -07:00
parent 828e417726
commit ad6a1962bb

View File

@@ -21,7 +21,7 @@ struct EventDetailView_Previews: PreviewProvider {
}
}
func scroll_to_event(scroller: ScrollViewProxy, id: String, delay: Double, animate: Bool, anchor: UnitPoint = .bottom) {
func scroll_to_event(scroller: ScrollViewProxy, id: String, delay: Double, animate: Bool, anchor: UnitPoint = .top) {
DispatchQueue.main.asyncAfter(deadline: .now() + delay) {
if animate {
withAnimation {