commit 8ea01b43a0afdc29ffff3391f8196794b6fe23a8
parent acc4650fa8fcc17a205e9a8e62288fbcd085d177
Author: William Casarin <jb55@jb55.com>
Date: Fri, 18 Nov 2022 19:07:12 -0800
timeline: fix scrolling-to-top when view is filtered
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/damus/Views/TimelineView.swift b/damus/Views/TimelineView.swift
@@ -57,7 +57,7 @@ struct TimelineView: View {
InnerTimelineView(events: $events, damus: damus, show_friend_icon: show_friend_icon, filter: filter)
}
.onReceive(NotificationCenter.default.publisher(for: .scroll_to_top)) { _ in
- guard let event = events.first else {
+ guard let event = events.filter(self.filter).first else {
return
}
scroll_to_event(scroller: scroller, id: event.id, delay: 0.0, animate: true)