Compare commits

...
Author SHA1 Message Date
Hocuri 2b60bb1eb8 clippy 2026-08-07 16:53:00 +02:00
Hocuri 8f6c9622f0 fix: Don't show "Not Connected" just because one of the relays can't connect
With multi-relay, it can happen that one of the relays can't connect or is stuck in "Connecting...". In this case, right now we show "Not Connected"/"Connecting" as the connectivity, which multiple users already complained about, esp. since it's not obvious how to remove an unpublished, not working relay.

Instead, the new logic is:
- If any relay is working, then we signal this to the user, to signal that new messages may come in.
- Only show "Connecting..." or "Not Connected" if all of the relays are failing to connect, because if any of the relays can connect then things are mostly fine.
2026-08-07 13:43:08 +02:00
+9 -4
View File
@@ -247,10 +247,15 @@ impl Context {
let connectivity = s.get_basic();
connectivities.push(connectivity);
}
connectivities
.into_iter()
.min()
.unwrap_or(Connectivity::NotConnected)
if connectivities.contains(&Connectivity::Working) {
Connectivity::Working
} else if connectivities.contains(&Connectivity::Connected) {
Connectivity::Connected
} else if connectivities.contains(&Connectivity::Connecting) {
Connectivity::Connecting
} else {
Connectivity::NotConnected
}
}
pub(crate) fn update_connectivities(&self, sched: &InnerSchedulerState) {