From b45b87d3c6c5fac935bf12d9e86a977cd2246cf7 Mon Sep 17 00:00:00 2001 From: Jakub Kalinowski Date: Mon, 16 Dec 2024 18:34:09 +0100 Subject: [PATCH] Ignoring isCompleted for AT_MOST habits --- .../java/org/isoron/uhabits/core/ui/NotificationTray.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 da5bb018a..8d17f5957 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 @@ -24,6 +24,7 @@ import org.isoron.uhabits.core.commands.CommandRunner import org.isoron.uhabits.core.commands.CreateRepetitionCommand import org.isoron.uhabits.core.commands.DeleteHabitsCommand import org.isoron.uhabits.core.models.Habit +import org.isoron.uhabits.core.models.NumericalHabitType import org.isoron.uhabits.core.models.Timestamp import org.isoron.uhabits.core.preferences.Preferences import org.isoron.uhabits.core.tasks.Task @@ -120,7 +121,7 @@ class NotificationTray @Inject constructor( override fun onPostExecute() { systemTray.log("Showing notification for habit=" + habit.id) - if (isCompleted) { + if (isCompleted && habit.targetType != NumericalHabitType.AT_MOST) { systemTray.log( String.format( Locale.US,