offlineState

Observable flow of offline state changes.

This flow emits the current offline state whenever it changes, including:

  • Company policy changes (whether offline mode is allowed by company)

  • User preference changes (whether user has enabled offline mode)

  • Computed enablement state (both company and user must enable)

Initial value is ZyncOfflineState.disabled until actual state is loaded.

Usage in Kotlin:

zync.settingsManager.offlineState.collect { state ->
println("Offline enabled: ${state.isOfflineEnabled}")
}

Usage in Swift:

zync.settingsManager.offlineState.collect { state in
print("Offline enabled: \(state.isOfflineEnabled)")
}

See also

for details about the state structure

for one-time synchronous state retrieval