diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2019-09-16 00:57:19 +0000 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2019-09-16 11:21:31 +0000 |
| commit | 8461ee34c84fc2de9d6a4e027d30d7ef0f796b7a (patch) | |
| tree | e7258e58837d1a82b48b0f3d64d2075b47eef1f9 /android | |
| parent | 7df61fdc3eb9878b63a4ae6313085f25b18a0138 (diff) | |
| download | mullvadvpn-8461ee34c84fc2de9d6a4e027d30d7ef0f796b7a.tar.xz mullvadvpn-8461ee34c84fc2de9d6a4e027d30d7ef0f796b7a.zip | |
Update notification based on real tunnel state
Diffstat (limited to 'android')
| -rw-r--r-- | android/src/main/kotlin/net/mullvad/mullvadvpn/ForegroundNotificationManager.kt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/ForegroundNotificationManager.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/ForegroundNotificationManager.kt index f42a48ce8d..dfb153bbc2 100644 --- a/android/src/main/kotlin/net/mullvad/mullvadvpn/ForegroundNotificationManager.kt +++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/ForegroundNotificationManager.kt @@ -26,8 +26,8 @@ class ForegroundNotificationManager(val service: Service, val connectionProxy: C private val notificationManager = service.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager - private val listenerId = connectionProxy.onUiStateChange.subscribe { uiState -> - tunnelState = uiState + private val listenerId = connectionProxy.onStateChange.subscribe { state -> + tunnelState = state } private var reconnecting = false @@ -147,7 +147,7 @@ class ForegroundNotificationManager(val service: Service, val connectionProxy: C fun onDestroy() { listenerId?.let { listener -> - connectionProxy.onUiStateChange.unsubscribe(listener) + connectionProxy.onStateChange.unsubscribe(listener) } service.apply { |
