fix a crash at trying to delete an event list section
This commit is contained in:
parent
74109796bb
commit
caae4a5f58
|
@ -189,8 +189,11 @@ class EventListAdapter(activity: SimpleActivity, var listItems: ArrayList<ListIt
|
||||||
val timestamps = ArrayList<Int>(selectedPositions.size)
|
val timestamps = ArrayList<Int>(selectedPositions.size)
|
||||||
|
|
||||||
selectedPositions.forEach {
|
selectedPositions.forEach {
|
||||||
eventIds.add((listItems[it] as ListEvent).id)
|
val item = listItems[it]
|
||||||
timestamps.add((listItems[it] as ListEvent).startTS)
|
if (item is ListEvent) {
|
||||||
|
eventIds.add(item.id)
|
||||||
|
timestamps.add(item.startTS)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DeleteEventDialog(activity, eventIds) {
|
DeleteEventDialog(activity, eventIds) {
|
||||||
|
|
Loading…
Reference in New Issue