From 33100df63352fcbd881f2a4ccbaeb46d802b2f83 Mon Sep 17 00:00:00 2001 From: Felix Wiemuth <533601+felixwiemuth@users.noreply.github.com> Date: Fri, 16 Sep 2022 14:23:14 +0200 Subject: [PATCH] Remove habits from active list when should not be shown --- .../java/org/isoron/uhabits/core/ui/NotificationTray.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/uhabits-core/src/jvmMain/java/org/isoron/uhabits/core/ui/NotificationTray.kt b/uhabits-core/src/jvmMain/java/org/isoron/uhabits/core/ui/NotificationTray.kt index 5239ed44b..b2f085d34 100644 --- a/uhabits-core/src/jvmMain/java/org/isoron/uhabits/core/ui/NotificationTray.kt +++ b/uhabits-core/src/jvmMain/java/org/isoron/uhabits/core/ui/NotificationTray.kt @@ -122,6 +122,7 @@ class NotificationTray @Inject constructor( habit.id ) ) + active.remove(habit) return } if (!habit.hasReminder()) { @@ -132,6 +133,7 @@ class NotificationTray @Inject constructor( habit.id ) ) + active.remove(habit) return } if (habit.isArchived) { @@ -142,6 +144,7 @@ class NotificationTray @Inject constructor( habit.id ) ) + active.remove(habit) return } if (!shouldShowReminderToday()) { @@ -152,6 +155,7 @@ class NotificationTray @Inject constructor( habit.id ) ) + active.remove(habit) return } systemTray.showNotification(