Reduce battery usage by using exp backoff on connections

Changelog-Changed: Reduce battery usage by using exp backoff on connections
This commit is contained in:
Bryan Montz
2023-03-15 10:37:37 -06:00
committed by William Casarin
12 changed files with 323 additions and 161 deletions

View File

@@ -104,8 +104,8 @@ class ThreadModel: ObservableObject {
print("subscribing to thread \(event.id) with sub_id \(base_subid)")
loading = true
damus_state.pool.subscribe(sub_id: base_subid, filters: base_filters, handler: handle_event)
damus_state.pool.subscribe(sub_id: meta_subid, filters: meta_filters, handler: handle_event)
damus_state.pool.subscribe_to(sub_id: base_subid, filters: base_filters, handler: handle_event)
damus_state.pool.subscribe_to(sub_id: meta_subid, filters: meta_filters, handler: handle_event)
}
func add_event(_ ev: NostrEvent, privkey: String?) {