Add scroll queue detection in notification view

This will stop injecting events into the timeline if you're scrolling
This commit is contained in:
William Casarin
2023-02-26 14:14:25 -08:00
parent 75fd8de456
commit 4b5c217213
4 changed files with 33 additions and 14 deletions

View File

@@ -22,6 +22,12 @@ struct NotificationsView: View {
NotificationItemView(state: state, item: item)
}
}
.background(GeometryReader { proxy -> Color in
DispatchQueue.main.async {
handle_scroll_queue(proxy, queue: self.notifications)
}
return Color.clear
})
.padding(.horizontal)
}
.onReceive(handle_notify(.scroll_to_top)) { notif in