commit 0b199a18b42cb9f3fdc0c00e3a6811a30417cb60
parent 23a125ea0fb135abf63fe26c52e22d0df8076582
Author: William Casarin <jb55@jb55.com>
Date: Thu, 9 May 2024 10:59:50 -0700
Revert "perf: debounce scroll queue"
This perf change was experimental and probably minor anyways
This reverts commit d49cf5a505a27585529c6824a0f136a73e7e848f.
Fixes: https://github.com/damus-io/damus/issues/2235
Changelog-Fixed: Fixed issue where timeline was scrolling when it isn't supposed to
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/damus/Views/TimelineView.swift b/damus/Views/TimelineView.swift
@@ -15,7 +15,6 @@ struct TimelineView<Content: View>: View {
let show_friend_icon: Bool
let filter: (NostrEvent) -> Bool
let content: Content?
- let debouncer: Debouncer
let apply_mute_rules: Bool
init(events: EventHolder, loading: Binding<Bool>, damus: DamusState, show_friend_icon: Bool, filter: @escaping (NostrEvent) -> Bool, apply_mute_rules: Bool = true, content: (() -> Content)? = nil) {
@@ -25,7 +24,6 @@ struct TimelineView<Content: View>: View {
self.show_friend_icon = show_friend_icon
self.filter = filter
self.apply_mute_rules = apply_mute_rules
- self.debouncer = Debouncer(interval: 0.5)
self.content = content?()
}
@@ -49,9 +47,7 @@ struct TimelineView<Content: View>: View {
.shimmer(loading)
.disabled(loading)
.background(GeometryReader { proxy -> Color in
- debouncer.debounce_immediate {
- handle_scroll_queue(proxy, queue: self.events)
- }
+ handle_scroll_queue(proxy, queue: self.events)
return Color.clear
})
}