mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
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,6 +135,7 @@ 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 {
|
||||||
|
if (itemViews[it] != null)
|
||||||
getProperView(itemViews[it]!!).isSelected = false
|
getProperView(itemViews[it]!!).isSelected = false
|
||||||
}
|
}
|
||||||
selectedPositions.clear()
|
selectedPositions.clear()
|
||||||
|
|
|
@ -130,6 +130,7 @@ 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 {
|
||||||
|
if (itemViews[it] != null)
|
||||||
getProperView(itemViews[it]!!).isSelected = false
|
getProperView(itemViews[it]!!).isSelected = false
|
||||||
}
|
}
|
||||||
selectedPositions.clear()
|
selectedPositions.clear()
|
||||||
|
|
Loading…
Reference in a new issue