From f8e316e1cc5d83d0865b14eb558bdbe3d1a608ff Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 5 May 2018 23:26:28 +0200 Subject: [PATCH] do not unselect events at sharing --- .../simplemobiletools/calendar/adapters/EventListAdapter.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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() {