diff --git a/android/uhabits-core/src/main/java/org/isoron/uhabits/core/ui/NotificationTray.java b/android/uhabits-core/src/main/java/org/isoron/uhabits/core/ui/NotificationTray.java index 2c348470..4ada1375 100644 --- a/android/uhabits-core/src/main/java/org/isoron/uhabits/core/ui/NotificationTray.java +++ b/android/uhabits-core/src/main/java/org/isoron/uhabits/core/ui/NotificationTray.java @@ -194,14 +194,6 @@ public class NotificationTray return; } - if (!shouldShowReminderToday()) { - systemTray.log(String.format( - Locale.US, - "Habit %d not supposed to run today. Skipping.", - habit.id)); - return; - } - if (!habit.hasReminder()) { systemTray.log(String.format( Locale.US, @@ -210,6 +202,23 @@ public class NotificationTray return; } + if (habit.isArchived()) + { + systemTray.log(String.format( + Locale.US, + "Habit %d is archived. Skipping.", + habit.id)); + return; + } + + if (!shouldShowReminderToday()) { + systemTray.log(String.format( + Locale.US, + "Habit %d not supposed to run today. Skipping.", + habit.id)); + return; + } + systemTray.showNotification(habit, getNotificationId(habit), timestamp, reminderTime); }