Multi-session subscriptions and RelayPool reopening
This commit implements nostr network subscriptions that survive between sessions, as well as improved handling of RelayPool opening/closing with respect to the app lifecycle. This prevents stale data after users swap out and back into Damus. Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
This commit is contained in:
@@ -712,6 +712,7 @@ class Ndb {
|
||||
return AsyncStream<StreamItem> { continuation in
|
||||
// Stream all results already present in the database
|
||||
for noteId in noteIds {
|
||||
if Task.isCancelled { return }
|
||||
continuation.yield(.event(noteId))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user