Fix conflict when manually enabled an older profile with a schedule overlap with a newer profile.

This commit is contained in:
Cody Henthorne
2021-12-09 14:50:37 -05:00
parent 76539ff0f2
commit c30a43ef45
3 changed files with 24 additions and 5 deletions

View File

@@ -60,7 +60,7 @@ data class NotificationProfileSchedule(
}
fun endDateTime(now: LocalDateTime): LocalDateTime {
return end.toLocalDateTime(now)
return end.toLocalDateTime(now).plusDays(if (end < start) 1 else 0)
}
}