Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Multiplatform/Navigation/TabRouterViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ final class TabRouterViewModel: Sendable {

logger.info("Loading online UI")

let allConnectionsUnavailable = await withTaskGroup {
let anyConnectionSucceeded = await withTaskGroup {
for connectionID in await PersistenceManager.shared.authorization.connectionIDs {
logger.info("Loading connection: \(connectionID)")

Expand Down Expand Up @@ -103,10 +103,10 @@ final class TabRouterViewModel: Sendable {
}
}

return await $0.reduce(true) { $0 && $1 }
return await $0.reduce(false) { $0 || $1 }
}
if allConnectionsUnavailable {

if !anyConnectionSucceeded {
await OfflineMode.shared.setEnabled(true)
}
}
Expand Down