Add scroll queue detection in notification view
This will stop injecting events into the timeline if you're scrolling
This commit is contained in:
@@ -45,7 +45,8 @@ enum NotificationItem {
|
||||
}
|
||||
}
|
||||
|
||||
class NotificationsModel: ObservableObject {
|
||||
class NotificationsModel: ObservableObject, ScrollQueue {
|
||||
|
||||
var incoming_zaps: [Zap]
|
||||
var incoming_events: [NostrEvent]
|
||||
var should_queue: Bool
|
||||
@@ -73,6 +74,10 @@ class NotificationsModel: ObservableObject {
|
||||
self.notifications = []
|
||||
}
|
||||
|
||||
func set_should_queue(_ val: Bool) {
|
||||
self.should_queue = val
|
||||
}
|
||||
|
||||
func uniq_pubkeys() -> [String] {
|
||||
var pks = Set<String>()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user