mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-07 11:17:25 +01:00
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()
|
||||
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 New Issue
Block a user