android/ui: treat NoState similar to Starting

Updates tailscale/corp#18202

NoState is now treated similar to starting for the on/off switch (which matches behaviour of the string)

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
jonathan/switch-state
Jonathan Nobels 7 months ago
parent 31939cc855
commit 038a3869e9

@ -43,7 +43,8 @@ class MainViewModel : IpnViewModel() {
viewModelScope.launch { viewModelScope.launch {
Notifier.state.collect { state -> Notifier.state.collect { state ->
stateRes.set(state.userStringRes()) stateRes.set(state.userStringRes())
vpnToggleState.set((state == State.Running || state == State.Starting)) vpnToggleState.set(
(state == State.Running || state == State.Starting || state == State.NoState))
} }
} }

Loading…
Cancel
Save