capping total priority at 100

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2025-10-11 23:56:53 +02:00
parent e89f513677
commit dd84bad070

View File

@@ -245,7 +245,7 @@ public class Task implements Mappable {
var diff = (int) (dueDate.toEpochDay()-LocalDate.now().toEpochDay());
if (diff <= 0) return priority + 100; // due date has passed
if (diff < 100) return priority + 100 - diff; // due within the next 100 days
return priority;
return Math.min(100,priority);
}