diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/adapters/EventListAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/adapters/EventListAdapter.kt index d6d694cc2..28af05406 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/adapters/EventListAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/adapters/EventListAdapter.kt @@ -165,10 +165,12 @@ class EventListAdapter(activity: SimpleActivity, val listItems: ArrayList(selectedPositions.size) selectedPositions.forEach { - eventIds.add((listItems[it] as ListEvent).id) + val item = listItems[it] + if (item is ListEvent) { + eventIds.add(item.id) + } } activity.shareEvents(eventIds.distinct()) - finishActMode() } private fun askConfirmDelete() {