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?) {
|
override fun onDestroyActionMode(actionMode: ActionMode?) {
|
||||||
super.onDestroyActionMode(actionMode)
|
super.onDestroyActionMode(actionMode)
|
||||||
selectedPositions.forEach {
|
selectedPositions.forEach {
|
||||||
getProperView(itemViews[it]!!).isSelected = false
|
if (itemViews[it] != null)
|
||||||
|
getProperView(itemViews[it]!!).isSelected = false
|
||||||
}
|
}
|
||||||
selectedPositions.clear()
|
selectedPositions.clear()
|
||||||
actMode = null
|
actMode = null
|
||||||
|
|
|
@ -130,7 +130,8 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
||||||
override fun onDestroyActionMode(actionMode: ActionMode?) {
|
override fun onDestroyActionMode(actionMode: ActionMode?) {
|
||||||
super.onDestroyActionMode(actionMode)
|
super.onDestroyActionMode(actionMode)
|
||||||
selectedPositions.forEach {
|
selectedPositions.forEach {
|
||||||
getProperView(itemViews[it]!!).isSelected = false
|
if (itemViews[it] != null)
|
||||||
|
getProperView(itemViews[it]!!).isSelected = false
|
||||||
}
|
}
|
||||||
selectedPositions.clear()
|
selectedPositions.clear()
|
||||||
actMode = null
|
actMode = null
|
||||||
|
|
Loading…
Reference in a new issue