mirror of
https://git.mihon.tech/mihonapp/mihon
synced 2024-11-27 17:49:16 +03:00
Fix chapter list selection uninverting (closes #3014)
This commit is contained in:
parent
fc7a040509
commit
33d2b0984f
2 changed files with 5 additions and 3 deletions
|
@ -139,6 +139,7 @@ class ChaptersController :
|
|||
val coordinates = binding.fab.getCoordinates()
|
||||
binding.revealView.hideRevealEffect(coordinates.x, coordinates.y, 1920)
|
||||
}
|
||||
|
||||
super.onActivityResumed(activity)
|
||||
}
|
||||
|
||||
|
@ -457,9 +458,13 @@ class ChaptersController :
|
|||
|
||||
private fun selectInverse() {
|
||||
val adapter = adapter ?: return
|
||||
|
||||
selectedItems.clear()
|
||||
for (i in 0..adapter.itemCount) {
|
||||
adapter.toggleSelection(i)
|
||||
}
|
||||
selectedItems.addAll(adapter.selectedPositions.mapNotNull { adapter.getItem(it) })
|
||||
|
||||
actionMode?.invalidate()
|
||||
adapter.notifyDataSetChanged()
|
||||
}
|
||||
|
|
|
@ -265,9 +265,6 @@ class UpdatesController :
|
|||
presenter.deleteChapters(chaptersToDelete)
|
||||
}
|
||||
|
||||
/**
|
||||
* Destory [ActionMode] if it's shown
|
||||
*/
|
||||
private fun destroyActionModeIfNeeded() {
|
||||
actionMode?.finish()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue