adding a list widget related crashfix

This commit is contained in:
tibbi 2020-05-04 19:01:07 +02:00
parent acb8124e08
commit 842e01d29b
1 changed files with 1 additions and 1 deletions

View File

@ -142,7 +142,7 @@ class EventListWidgetAdapter(val context: Context) : RemoteViewsService.RemoteVi
}
}
private fun getItemViewType(position: Int) = if (events[position] is ListEvent) ITEM_EVENT else ITEM_HEADER
private fun getItemViewType(position: Int) = if (events.getOrNull(position) is ListEvent) ITEM_EVENT else ITEM_HEADER
override fun getLoadingView() = null