Enable Offline mode of the SyncService, so that the sync starts automatically when the network is back.

Also rely on the sync state to render the "Offline" banner.
This commit is contained in:
Benoit Marty
2025-02-03 17:47:35 +01:00
parent f4afda119b
commit f84aa03605
20 changed files with 91 additions and 74 deletions
@@ -14,3 +14,11 @@ enum class SyncState {
Terminated,
Offline,
}
fun SyncState.isConnected() = when (this) {
SyncState.Idle,
SyncState.Running,
SyncState.Error,
SyncState.Terminated -> true
SyncState.Offline -> false
}