diff options
Diffstat (limited to 'android/src')
| -rw-r--r-- | android/src/main/kotlin/net/mullvad/mullvadvpn/ui/notification/InAppNotificationController.kt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/notification/InAppNotificationController.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/notification/InAppNotificationController.kt index a67cd7ea45..eaea1a275b 100644 --- a/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/notification/InAppNotificationController.kt +++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/notification/InAppNotificationController.kt @@ -8,8 +8,10 @@ class InAppNotificationController(private val onNotificationChanged: (InAppNotif private var currentIndex: Int? = null - var current by observable<InAppNotification?>(null) { _, _, notification -> - onNotificationChanged.invoke(notification) + var current by observable<InAppNotification?>(null) { _, oldNotification, newNotification -> + if (oldNotification != newNotification) { + onNotificationChanged.invoke(newNotification) + } } fun register(notification: InAppNotification) { |
