HabitMatcher: only compute today's value if needed
This commit is contained in:
parent
50da14022f
commit
f3b9fc825a
@ -76,8 +76,12 @@ public class HabitMatcher
|
|||||||
if (!isArchivedAllowed() && habit.isArchived()) return false;
|
if (!isArchivedAllowed() && habit.isArchived()) return false;
|
||||||
if (isReminderRequired() && !habit.hasReminder()) return false;
|
if (isReminderRequired() && !habit.hasReminder()) return false;
|
||||||
|
|
||||||
int todayCheckmark = habit.getCheckmarks().getTodayValue();
|
if(!isCompletedAllowed())
|
||||||
if (todayCheckmark != UNCHECKED && !isCompletedAllowed()) return false;
|
{
|
||||||
|
int todayCheckmark = habit.getCheckmarks().getTodayValue();
|
||||||
|
if (todayCheckmark != UNCHECKED) return false;
|
||||||
|
}
|
||||||
|
|
||||||
if(!allowedColors.contains(habit.getColor())) return false;
|
if(!allowedColors.contains(habit.getColor())) return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user