Don't show reminders from archived habits (#639)

This commit is contained in:
Kristian Tashkov
2020-09-12 21:15:23 +03:00
committed by GitHub
parent 69f11c9d4e
commit 07f8583c3d

View File

@@ -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);
}