adding a crashfix at drawing the weekly view grid

This commit is contained in:
tibbi 2020-07-06 16:59:24 +02:00
parent 97b652dc58
commit 09ad7e72cf
1 changed files with 2 additions and 1 deletions

View File

@ -241,7 +241,7 @@ class WeekFragment : Fragment(), WeeklyCalendar {
}
private fun initGrid() {
(0 until config.weeklyViewDays).map { dayColumns[it] }
(0 until config.weeklyViewDays).mapNotNull { dayColumns.getOrNull(it) }
.forEachIndexed { index, layout ->
layout.removeAllViews()
val gestureDetector = getViewGestureDetector(layout, index)
@ -596,6 +596,7 @@ class WeekFragment : Fragment(), WeeklyCalendar {
allDayRows.last().add(dayIndex)
}
}
if (wasEventHandled) {
break
}