Use the SDK's offline detection everywhere (except for restarting the sync loop). (#4472)

* Use the SDK's offline state to drive the offline indicator.

* Only use network reachability for restarting the sync loop, use the homeserver reachability for requests.

* Add a separate indicator to distinguish when the server is unreachable but the device is online.
This commit is contained in:
Doug
2025-09-08 13:18:02 +01:00
committed by GitHub
parent 20b57d0ad7
commit 90504d89c8
26 changed files with 152 additions and 127 deletions
@@ -23,14 +23,9 @@ class SecureBackupLogoutConfirmationScreenViewModelTests: XCTestCase {
secureBackupController.underlyingKeyBackupState = CurrentValueSubject<SecureBackupKeyBackupState, Never>(.enabled).asCurrentValuePublisher()
reachabilitySubject = CurrentValueSubject<NetworkMonitorReachability, Never>(.reachable)
let networkMonitor = NetworkMonitorMock()
networkMonitor.underlyingReachabilityPublisher = reachabilitySubject.asCurrentValuePublisher()
let appMediator = AppMediatorMock()
appMediator.underlyingNetworkMonitor = networkMonitor
viewModel = SecureBackupLogoutConfirmationScreenViewModel(secureBackupController: secureBackupController,
appMediator: appMediator)
homeserverReachabilityPublisher: reachabilitySubject.asCurrentValuePublisher())
}
func testInitialState() {