summaryrefslogtreecommitdiffhomepage
path: root/android
diff options
context:
space:
mode:
authorDavid Göransson <david.goransson@mullvad.net>2024-10-09 09:41:54 +0200
committerDavid Göransson <david.goransson@mullvad.net>2024-10-09 16:03:43 +0200
commitb27cb9a57038b724cbc9996018c5e3e2bd99541c (patch)
treec9107550d864300feae45e6622e9dabc34e79a65 /android
parent72edaa766f18d12ebbd56ffc610c8a84d57e0b8a (diff)
downloadmullvadvpn-b27cb9a57038b724cbc9996018c5e3e2bd99541c.tar.xz
mullvadvpn-b27cb9a57038b724cbc9996018c5e3e2bd99541c.zip
Fix re-subscribe crash
Diffstat (limited to 'android')
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/CustomListLocationsViewModel.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/CustomListLocationsViewModel.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/CustomListLocationsViewModel.kt
index 271e7cd7f5..320420369d 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/CustomListLocationsViewModel.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/CustomListLocationsViewModel.kt
@@ -11,10 +11,10 @@ import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.combine
-import kotlinx.coroutines.flow.consumeAsFlow
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.onEach
+import kotlinx.coroutines.flow.receiveAsFlow
import kotlinx.coroutines.flow.stateIn
import kotlinx.coroutines.flow.update
import kotlinx.coroutines.launch
@@ -43,7 +43,7 @@ class CustomListLocationsViewModel(
private val navArgs =
CustomListLocationsDestination.argsFrom(savedStateHandle = savedStateHandle)
private val _uiSideEffect = Channel<CustomListLocationsSideEffect>()
- val uiSideEffect: Flow<CustomListLocationsSideEffect> = _uiSideEffect.consumeAsFlow()
+ val uiSideEffect: Flow<CustomListLocationsSideEffect> = _uiSideEffect.receiveAsFlow()
private val _initialLocations = MutableStateFlow<Set<RelayItem.Location>>(emptySet())
private val _selectedLocations = MutableStateFlow<Set<RelayItem.Location>?>(null)