capping total priority at 100
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user