add some null checks to deselecting items
This commit is contained in:
parent
e086ac134f
commit
9e788d9453
2 changed files with 4 additions and 2 deletions
|
@ -135,7 +135,8 @@ class DirectoryAdapter(val activity: SimpleActivity, val dirs: MutableList<Direc
|
|||
override fun onDestroyActionMode(actionMode: ActionMode?) {
|
||||
super.onDestroyActionMode(actionMode)
|
||||
selectedPositions.forEach {
|
||||
getProperView(itemViews[it]!!).isSelected = false
|
||||
if (itemViews[it] != null)
|
||||
getProperView(itemViews[it]!!).isSelected = false
|
||||
}
|
||||
selectedPositions.clear()
|
||||
actMode = null
|
||||
|
|
|
@ -130,7 +130,8 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
|||
override fun onDestroyActionMode(actionMode: ActionMode?) {
|
||||
super.onDestroyActionMode(actionMode)
|
||||
selectedPositions.forEach {
|
||||
getProperView(itemViews[it]!!).isSelected = false
|
||||
if (itemViews[it] != null)
|
||||
getProperView(itemViews[it]!!).isSelected = false
|
||||
}
|
||||
selectedPositions.clear()
|
||||
actMode = null
|
||||
|
|
Loading…
Reference in a new issue