remove some redundant endTS checks
This commit is contained in:
parent
5fc1d1fac8
commit
a960e75da9
|
@ -409,7 +409,7 @@ class DBHelper private constructor(val context: Context) : SQLiteOpenHelper(cont
|
||||||
} else {
|
} else {
|
||||||
events.add(event.copy())
|
events.add(event.copy())
|
||||||
}
|
}
|
||||||
} else if (getRunningEvents && (event.startTS <= fromTS && event.endTS >= toTS)) {
|
} else if (getRunningEvents && (event.startTS <= fromTS)) {
|
||||||
events.add(event.copy())
|
events.add(event.copy())
|
||||||
}
|
}
|
||||||
event.addIntervalTime()
|
event.addIntervalTime()
|
||||||
|
@ -423,14 +423,14 @@ class DBHelper private constructor(val context: Context) : SQLiteOpenHelper(cont
|
||||||
if (event.repeatInterval % WEEK == 0) {
|
if (event.repeatInterval % WEEK == 0) {
|
||||||
if (event.startTS.isTsOnProperDay(event)) {
|
if (event.startTS.isTsOnProperDay(event)) {
|
||||||
if (isOnProperWeek(event, startTimes)) {
|
if (isOnProperWeek(event, startTimes)) {
|
||||||
if (event.startTS >= fromTS && event.startTS < toTS) {
|
if (event.startTS >= fromTS) {
|
||||||
events.add(event.copy())
|
events.add(event.copy())
|
||||||
}
|
}
|
||||||
event.repeatLimit++
|
event.repeatLimit++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (event.startTS <= toTS && event.endTS >= fromTS) {
|
if (event.startTS <= toTS) {
|
||||||
events.add(event.copy())
|
events.add(event.copy())
|
||||||
}
|
}
|
||||||
event.repeatLimit++
|
event.repeatLimit++
|
||||||
|
|
Loading…
Reference in New Issue