fix #185, properly display weekly all-day events
This commit is contained in:
parent
dadaec8eb9
commit
bfc991ae6e
|
@ -495,10 +495,18 @@ class DBHelper private constructor(val context: Context) : SQLiteOpenHelper(cont
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.isAllDay) {
|
if (event.isAllDay) {
|
||||||
val dayCode = Formatter.getDayCodeFromTS(fromTS)
|
if (event.repeatInterval.isXWeeklyRepetition()) {
|
||||||
val endDayCode = Formatter.getDayCodeFromTS(event.endTS)
|
if (event.startTS.isTsOnProperDay(event)) {
|
||||||
if (dayCode == endDayCode) {
|
if (isOnProperWeek(event, startTimes)) {
|
||||||
events.add(event.copy())
|
events.add(event.copy())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
val dayCode = Formatter.getDayCodeFromTS(fromTS)
|
||||||
|
val endDayCode = Formatter.getDayCodeFromTS(event.endTS)
|
||||||
|
if (dayCode == endDayCode) {
|
||||||
|
events.add(event.copy())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
event.addIntervalTime(original)
|
event.addIntervalTime(original)
|
||||||
|
|
Loading…
Reference in New Issue