From ad6a1962bbddc17762c4a73dbe25398c7d79f861 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Tue, 11 Jul 2023 12:55:54 -0700 Subject: [PATCH] Scroll to top of event instead of bottom This is pretty important for longform events Changelog-Changed: Start at top when reading longform events --- damus/Views/EventDetailView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/damus/Views/EventDetailView.swift b/damus/Views/EventDetailView.swift index 1937ba3f..8c764e21 100644 --- a/damus/Views/EventDetailView.swift +++ b/damus/Views/EventDetailView.swift @@ -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 {