handle all reminder periods properly
This commit is contained in:
parent
a647a52c31
commit
19bc2b627f
|
@ -54,7 +54,7 @@ fun Context.scheduleNextEventReminder(event: Event) {
|
||||||
reminderSeconds.forEach {
|
reminderSeconds.forEach {
|
||||||
var startTS = event.startTS - it
|
var startTS = event.startTS - it
|
||||||
if (event.repeatInterval == DAY || event.repeatInterval == WEEK || event.repeatInterval == BIWEEK) {
|
if (event.repeatInterval == DAY || event.repeatInterval == WEEK || event.repeatInterval == BIWEEK) {
|
||||||
while (startTS < now || event.ignoreEventOccurrences.contains(startTS)) {
|
while (startTS < now || event.ignoreEventOccurrences.contains(startTS + it)) {
|
||||||
startTS += event.repeatInterval
|
startTS += event.repeatInterval
|
||||||
}
|
}
|
||||||
nextTS = Math.min(nextTS, startTS)
|
nextTS = Math.min(nextTS, startTS)
|
||||||
|
|
Loading…
Reference in New Issue