diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2020-10-03 18:46:13 +0000 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2020-10-05 12:32:42 +0000 |
| commit | 9dca1211e1e0c707b2ec59036b510c44872a6963 (patch) | |
| tree | 6828d32ebc06cd33c3e4c261b85716523cebf02a /android/src | |
| parent | dccb131165ba5a03507e68fe8cf654f1a3468f1d (diff) | |
| download | mullvadvpn-9dca1211e1e0c707b2ec59036b510c44872a6963.tar.xz mullvadvpn-9dca1211e1e0c707b2ec59036b510c44872a6963.zip | |
Allow `onForeground` property to be read
Diffstat (limited to 'android/src')
| -rw-r--r-- | android/src/main/kotlin/net/mullvad/mullvadvpn/service/ForegroundNotificationManager.kt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/service/ForegroundNotificationManager.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/service/ForegroundNotificationManager.kt index 9d76a0be52..0329e156bf 100644 --- a/android/src/main/kotlin/net/mullvad/mullvadvpn/service/ForegroundNotificationManager.kt +++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/service/ForegroundNotificationManager.kt @@ -46,14 +46,15 @@ class ForegroundNotificationManager( private var loggedIn by observable(false) { _, _, _ -> updateNotificationAction() } - private var onForeground = false - private val tunnelState get() = tunnelStateEvents?.latestEvent ?: TunnelState.Disconnected() private val shouldBeOnForeground get() = lockedToForeground || !(tunnelState is TunnelState.Disconnected) + var onForeground = false + private set + var lockedToForeground by observable(false) { _, _, _ -> updateNotification() } init { |
