From 038a3869e9f3b2fcba6e3305a39bfbabed4cc45a Mon Sep 17 00:00:00 2001 From: Jonathan Nobels Date: Wed, 3 Apr 2024 17:37:51 -0400 Subject: [PATCH] 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 --- .../main/java/com/tailscale/ipn/ui/viewModel/MainViewModel.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/android/src/main/java/com/tailscale/ipn/ui/viewModel/MainViewModel.kt b/android/src/main/java/com/tailscale/ipn/ui/viewModel/MainViewModel.kt index f99d407..4598774 100644 --- a/android/src/main/java/com/tailscale/ipn/ui/viewModel/MainViewModel.kt +++ b/android/src/main/java/com/tailscale/ipn/ui/viewModel/MainViewModel.kt @@ -43,7 +43,8 @@ class MainViewModel : IpnViewModel() { viewModelScope.launch { Notifier.state.collect { state -> stateRes.set(state.userStringRes()) - vpnToggleState.set((state == State.Running || state == State.Starting)) + vpnToggleState.set( + (state == State.Running || state == State.Starting || state == State.NoState)) } }