damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit fddd86b207b82f6f9bf7954919ab7741fc03a342
parent 95f1127b74d4fa02181a7cd49351c19032ce5431
Author: William Casarin <jb55@jb55.com>
Date:   Tue, 25 Apr 2023 08:53:38 -0700

Revert "Remove unneeded periodic reconnect timer"

This reverts commit ed058afc3bdcf93ac32f0ffe4d5ca927e76a4ddb.

Diffstat:
Mdamus/ContentView.swift | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/damus/ContentView.swift b/damus/ContentView.swift @@ -80,6 +80,9 @@ struct ContentView: View { @State private var isSideBarOpened = false @StateObject var home: HomeModel = HomeModel() + // connect retry timer + let timer = Timer.publish(every: 4, on: .main, in: .common).autoconnect() + let sub_id = UUID().description @Environment(\.colorScheme) var colorScheme @@ -447,6 +450,9 @@ struct ContentView: View { print("post cancelled") } } + .onReceive(timer) { n in + self.damus_state?.pool.connect_to_disconnected() + } .onReceive(handle_notify(.new_mutes)) { notif in home.filter_events() }