Closed nilsreichardt closed 1 year ago
In previous versions, if the course is not present in the timetable, we just used the next day as a due date.
Was it the next day (tomorrow) or the next school day? (So if tomorrow is the weekend or the next days are holidays they are skipped)
static DateTime _getSeedTodoUntilDate() {
DateTime now =
DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day);
if (DateTime.now().weekday == DateTime.friday ||
DateTime.now().weekday == DateTime.saturday) {
DateTime monday = now.add(
Duration(days: DateTime.now().weekday == DateTime.friday ? 3 : 2));
return monday;
} else {
DateTime tomorrow = now.add(const Duration(days: 1));
return tomorrow;
}
}
This seems to be the algorithm
Describe the bug
If a course is not present in the timetable, the autofill for the due date of the homework doesn't work anymore.
Steps to reproduce the bug
Current broken behavior
No due date is autofilled.
Expected behavior
In previous versions, if the course is not present in the timetable, we just used the next day as a due date.
Screenshots, videos or logs
https://github.com/SharezoneApp/sharezone-app/assets/24459435/2fe5307c-dfc6-4f3c-aabe-9954d6eb5839
Tested device
Device: MacBook Pro M1
OS: macOS 13.6
App type: macOS
App version: Alpha 1.7.9 (600), 90d4bd3c5ffee22b8a61a5448181a826ba31eaec
Additional context
cc: @Jonas-Sander
Possible solution