simplify the way we are getting repeatable events

This commit is contained in:
tibbi 2017-02-11 23:25:06 +01:00
parent a9bebaa4a6
commit 73a9dc56da
1 changed files with 1 additions and 3 deletions

View File

@ -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()
} }