fix repetition multiple days a week in a row

This commit is contained in:
tibbi 2018-03-29 19:26:40 +02:00
parent 395db85741
commit 97a6b15430

View file

@ -96,7 +96,7 @@ class MonthView(context: Context, attrs: AttributeSet, defStyle: Int) : View(con
// make sure we properly handle events lasting multiple days and repeating ones
val lastEvent = allEvents.lastOrNull { it.id == event.id }
val daysCnt = getEventLastingDaysCount(event)
if (lastEvent == null || lastEvent.startDayIndex + daysCnt < day.indexOnMonthView) {
if (lastEvent == null || lastEvent.startDayIndex + daysCnt <= day.indexOnMonthView) {
val monthViewEvent = MonthViewEvent(event.id, event.title, event.startTS, event.color, day.indexOnMonthView,
daysCnt, day.indexOnMonthView, event.getIsAllDay())
allEvents.add(monthViewEvent)