summaryrefslogtreecommitdiffhomepage
path: root/android/app/src
diff options
context:
space:
mode:
authorAlbin <albin@mullvad.net>2022-12-14 15:37:31 +0100
committerAlbin <albin@mullvad.net>2022-12-14 15:37:31 +0100
commit45f5f603506b37e5dbc00e3677e1a55e0a3140b1 (patch)
treee699230169557ec7215281031f6b9edc10396117 /android/app/src
parent7a591dc4d8f688c2342be8cddf19306f23e51e88 (diff)
parent49c5a0d58133053461a8938744ecfe1941564760 (diff)
downloadmullvadvpn-45f5f603506b37e5dbc00e3677e1a55e0a3140b1.tar.xz
mullvadvpn-45f5f603506b37e5dbc00e3677e1a55e0a3140b1.zip
Merge branch 'fix-incorrect-in-app-notification-showing'
Diffstat (limited to 'android/app/src')
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/notification/InAppNotificationController.kt6
1 files changed, 4 insertions, 2 deletions
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/notification/InAppNotificationController.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/notification/InAppNotificationController.kt
index aada1847a9..1c0fb73d93 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/notification/InAppNotificationController.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/notification/InAppNotificationController.kt
@@ -45,8 +45,10 @@ class InAppNotificationController(private val onNotificationChanged: (InAppNotif
}
fun notificationChanged(notification: InAppNotification) {
- if (notification.shouldShow && !activeNotifications.contains(notification)) {
- activeNotifications.add(notification)
+ if (notification.shouldShow) {
+ if (activeNotifications.contains(notification).not()) {
+ activeNotifications.add(notification)
+ }
} else {
activeNotifications.remove(notification)
}