feat(#1222): add background connection toggle to chat menu (#1235)

This commit is contained in:
m57 authored and GitHub committed 2026-09-23 11:50:18 +03:00
1 parent ee634e2abb
commit 721edef618
4 files changed
+112 -1

No files matched your search

@@ -376,6 +376,12 @@ class SettingsViewModel(
AuthManager.setKeepConnectedInBackground(enabled)
}
/** Reconcile the chat shortcut with changes made through Settings or another screen. */
fun refreshKeepConnectedInBackground() {
val enabled = AuthManager.isKeepConnectedInBackground()
_uiState.update { it.copy(keepConnectedInBackground = enabled) }
}
/** Clear all auth credentials — logs out and returns to landing screen. */
fun logout() {
AuthManager.setToken(null)