mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-01-11 16:24:57 +01:00
improve weekly and custom repetitions too
This commit is contained in:
parent
c44abf2957
commit
bc7b1f0a3d
@ -37,10 +37,16 @@ data class Event(var id: Int = 0, var startTS: Int = 0, var endTS: Int = 0, var
|
||||
else -> currStart.plusMonths(repeatInterval / MONTH).dayOfMonth().withMaximumValue()
|
||||
}
|
||||
repeatInterval % WEEK == 0 -> {
|
||||
// step through weekly repetition by days too, as events can trigger multiple times a week
|
||||
currStart.plusDays(1)
|
||||
// step through weekly repetition by days, as events can trigger multiple times a week
|
||||
startTS += DAY_SECONDS
|
||||
endTS += DAY_SECONDS
|
||||
return
|
||||
}
|
||||
else -> {
|
||||
startTS += repeatInterval
|
||||
endTS += repeatInterval
|
||||
return
|
||||
}
|
||||
else -> currStart.plusSeconds(repeatInterval)
|
||||
}
|
||||
val newStartTS = newStart.seconds()
|
||||
val newEndTS = newStartTS + (endTS - startTS)
|
||||
|
Loading…
Reference in New Issue
Block a user