Fix chapter list selection uninverting (closes #3014)
This commit is contained in:
parent
fc7a040509
commit
33d2b0984f
@ -139,6 +139,7 @@ class ChaptersController :
|
|||||||
val coordinates = binding.fab.getCoordinates()
|
val coordinates = binding.fab.getCoordinates()
|
||||||
binding.revealView.hideRevealEffect(coordinates.x, coordinates.y, 1920)
|
binding.revealView.hideRevealEffect(coordinates.x, coordinates.y, 1920)
|
||||||
}
|
}
|
||||||
|
|
||||||
super.onActivityResumed(activity)
|
super.onActivityResumed(activity)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -457,9 +458,13 @@ class ChaptersController :
|
|||||||
|
|
||||||
private fun selectInverse() {
|
private fun selectInverse() {
|
||||||
val adapter = adapter ?: return
|
val adapter = adapter ?: return
|
||||||
|
|
||||||
|
selectedItems.clear()
|
||||||
for (i in 0..adapter.itemCount) {
|
for (i in 0..adapter.itemCount) {
|
||||||
adapter.toggleSelection(i)
|
adapter.toggleSelection(i)
|
||||||
}
|
}
|
||||||
|
selectedItems.addAll(adapter.selectedPositions.mapNotNull { adapter.getItem(it) })
|
||||||
|
|
||||||
actionMode?.invalidate()
|
actionMode?.invalidate()
|
||||||
adapter.notifyDataSetChanged()
|
adapter.notifyDataSetChanged()
|
||||||
}
|
}
|
||||||
|
@ -265,9 +265,6 @@ class UpdatesController :
|
|||||||
presenter.deleteChapters(chaptersToDelete)
|
presenter.deleteChapters(chaptersToDelete)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Destory [ActionMode] if it's shown
|
|
||||||
*/
|
|
||||||
private fun destroyActionModeIfNeeded() {
|
private fun destroyActionModeIfNeeded() {
|
||||||
actionMode?.finish()
|
actionMode?.finish()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user