diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2019-07-27 12:58:20 +0000 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2019-07-30 08:55:51 +0000 |
| commit | b851d0b92c7c97645872f52a822a28d827109adf (patch) | |
| tree | 4494335c5cbe9840c9cc08ca01da3d1219f07240 /android/src | |
| parent | 90a353614d70e49587ebc4153ac990dc1a47fa22 (diff) | |
| download | mullvadvpn-b851d0b92c7c97645872f52a822a28d827109adf.tar.xz mullvadvpn-b851d0b92c7c97645872f52a822a28d827109adf.zip | |
Ensure anticipated location is set on disconnected
Diffstat (limited to 'android/src')
| -rw-r--r-- | android/src/main/kotlin/net/mullvad/mullvadvpn/dataproxy/LocationInfoCache.kt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/dataproxy/LocationInfoCache.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/dataproxy/LocationInfoCache.kt index 3884490bcc..6fc655c2a8 100644 --- a/android/src/main/kotlin/net/mullvad/mullvadvpn/dataproxy/LocationInfoCache.kt +++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/dataproxy/LocationInfoCache.kt @@ -39,7 +39,10 @@ class LocationInfoCache( field = value when (value) { - is TunnelState.Disconnected -> fetchLocation() + is TunnelState.Disconnected -> { + location = lastKnownRealLocation + fetchLocation() + } is TunnelState.Connecting -> location = value.location is TunnelState.Connected -> { location = value.location |
