simplify the way we are getting repeatable events
This commit is contained in:
parent
a9bebaa4a6
commit
73a9dc56da
|
@ -337,9 +337,7 @@ class DBHelper private constructor(val context: Context) : SQLiteOpenHelper(cont
|
||||||
for (e in events) {
|
for (e in events) {
|
||||||
while (e.startTS < toTS && (e.repeatLimit == 0 || e.repeatLimit > e.endTS)) {
|
while (e.startTS < toTS && (e.repeatLimit == 0 || e.repeatLimit > e.endTS)) {
|
||||||
if (e.startTS > fromTS) {
|
if (e.startTS > fromTS) {
|
||||||
val newEvent = Event(e.id, e.startTS, e.endTS, e.title, e.description, e.reminder1Minutes, e.reminder2Minutes, e.reminder3Minutes,
|
newEvents.add(e.copy())
|
||||||
e.repeatInterval, e.importId, e.flags, e.eventType)
|
|
||||||
newEvents.add(newEvent)
|
|
||||||
}
|
}
|
||||||
e.addIntervalTime()
|
e.addIntervalTime()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue