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:
@@ -15,7 +15,6 @@ struct TimelineView<Content: View>: View {
|
|||||||
let show_friend_icon: Bool
|
let show_friend_icon: Bool
|
||||||
let filter: (NostrEvent) -> Bool
|
let filter: (NostrEvent) -> Bool
|
||||||
let content: Content?
|
let content: Content?
|
||||||
let debouncer: Debouncer
|
|
||||||
let apply_mute_rules: Bool
|
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) {
|
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.show_friend_icon = show_friend_icon
|
||||||
self.filter = filter
|
self.filter = filter
|
||||||
self.apply_mute_rules = apply_mute_rules
|
self.apply_mute_rules = apply_mute_rules
|
||||||
self.debouncer = Debouncer(interval: 0.5)
|
|
||||||
self.content = content?()
|
self.content = content?()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,9 +47,7 @@ struct TimelineView<Content: View>: View {
|
|||||||
.shimmer(loading)
|
.shimmer(loading)
|
||||||
.disabled(loading)
|
.disabled(loading)
|
||||||
.background(GeometryReader { proxy -> Color in
|
.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
|
return Color.clear
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user