mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 01:08:50 -06:00
HabitMatcher: only compute today's value if needed
This commit is contained in:
@@ -76,8 +76,12 @@ public class HabitMatcher
|
||||
if (!isArchivedAllowed() && habit.isArchived()) return false;
|
||||
if (isReminderRequired() && !habit.hasReminder()) return false;
|
||||
|
||||
if(!isCompletedAllowed())
|
||||
{
|
||||
int todayCheckmark = habit.getCheckmarks().getTodayValue();
|
||||
if (todayCheckmark != UNCHECKED && !isCompletedAllowed()) return false;
|
||||
if (todayCheckmark != UNCHECKED) return false;
|
||||
}
|
||||
|
||||
if(!allowedColors.contains(habit.getColor())) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user