do not unselect events at sharing

This commit is contained in:
tibbi 2018-05-05 23:26:28 +02:00
parent e049067671
commit f8e316e1cc
1 changed files with 4 additions and 2 deletions

View File

@ -165,10 +165,12 @@ class EventListAdapter(activity: SimpleActivity, val listItems: ArrayList<ListIt
private fun shareEvents() { private fun shareEvents() {
val eventIds = ArrayList<Int>(selectedPositions.size) val eventIds = ArrayList<Int>(selectedPositions.size)
selectedPositions.forEach { 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()) activity.shareEvents(eventIds.distinct())
finishActMode()
} }
private fun askConfirmDelete() { private fun askConfirmDelete() {