diff options
| author | Jonatan Rhodin <jonatan.rhodin@mullvad.net> | 2023-09-04 14:39:59 +0200 |
|---|---|---|
| committer | Jonatan Rhodin <jonatan.rhodin@mullvad.net> | 2023-09-06 10:53:29 +0200 |
| commit | e05a9dcdc927e18184a3e19b3262ebacfca96670 (patch) | |
| tree | b7fdee8ea5bbdb33a63fc57365ca6628366ab677 | |
| parent | cfc1aa9b12de7accc86e7e65606058d11ab76102 (diff) | |
| download | mullvadvpn-e05a9dcdc927e18184a3e19b3262ebacfca96670.tar.xz mullvadvpn-e05a9dcdc927e18184a3e19b3262ebacfca96670.zip | |
Stop filtering null locations to avoid bugs with connection errors
| -rw-r--r-- | android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/ConnectViewModel.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/ConnectViewModel.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/ConnectViewModel.kt index b67cd754c4..3df2ea3a07 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/ConnectViewModel.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/ConnectViewModel.kt @@ -134,7 +134,8 @@ class ConnectViewModel( awaitClose { onNewLocation = null } } // Filter out empty or short-name country representations. - .filter { it?.let { location -> location.country.length > 2 } ?: false } + // We want to keep null location to handle those situations + .filter { it?.let { location -> location.country.length > 2 } ?: true } private fun RelayListListener.relayListCallbackFlow() = callbackFlow { onRelayCountriesChange = { _, item -> this.trySend(item) } |
