improve handling of events repeating x times weekly, fix #157

This commit is contained in:
tibbi 2017-05-05 20:01:08 +02:00
parent 088317883a
commit 145680899b
1 changed files with 3 additions and 3 deletions

View File

@ -406,11 +406,11 @@ class DBHelper private constructor(val context: Context) : SQLiteOpenHelper(cont
// events repeating x times
while (it.repeatLimit < 0 && it.endTS < toTS) {
if (it.repeatInterval != 0 && it.repeatInterval % WEEK == 0) {
if (it.startTS >= fromTS && it.startTS < toTS) {
if (it.startTS.isTsOnValidDay(it)) {
if (it.startTS >= fromTS && it.startTS < toTS) {
newEvents.add(it.copy())
it.repeatLimit++
}
it.repeatLimit++
}
it.addIntervalTime()
} else {