1
0
mirror of git://jb55.com/damus synced 2024-09-29 16:30:44 +00:00

Revert "perf: debounce scroll queue"

This perf change was experimental and probably minor anyways

This reverts commit d49cf5a505.

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>
This commit is contained in:
William Casarin 2024-05-09 10:59:50 -07:00
parent 23a125ea0f
commit 0b199a18b4

View File

@ -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
})
}