From 33901dd72f7706a3e5723878fa71503b376ff16b Mon Sep 17 00:00:00 2001 From: arkon Date: Sat, 2 May 2020 14:51:28 -0400 Subject: [PATCH] More ActionToolbar tweaks --- .../eu/kanade/tachiyomi/ui/library/LibraryController.kt | 6 ++++-- .../kanade/tachiyomi/ui/recent/updates/UpdatesController.kt | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt index 78ab7e831..6bff0a3cc 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt @@ -327,7 +327,6 @@ class LibraryController( * Destroys the action mode. */ private fun destroyActionModeIfNeeded() { - (activity as? MainActivity)?.showBottomNav(visible = true, collapse = true) actionMode?.finish() } @@ -435,10 +434,13 @@ class LibraryController( } override fun onDestroyActionMode(mode: ActionMode?) { - binding.actionToolbar.hide() // Clear all the manga selections and notify child views. selectedMangas.clear() selectionRelay.call(LibrarySelectionEvent.Cleared()) + + binding.actionToolbar.hide() + (activity as? MainActivity)?.showBottomNav(visible = true, collapse = true) + actionMode = null } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/updates/UpdatesController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/updates/UpdatesController.kt index d945998ac..8c704b396 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/updates/UpdatesController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/updates/UpdatesController.kt @@ -271,7 +271,6 @@ class UpdatesController : } private fun destroyActionModeIfNeeded() { - (activity as? MainActivity)?.showBottomNav(visible = true, collapse = true) actionMode?.finish() } @@ -353,9 +352,12 @@ class UpdatesController : * @param mode the ActionMode object */ override fun onDestroyActionMode(mode: ActionMode?) { - binding.actionToolbar.hide() adapter?.mode = SelectableAdapter.Mode.IDLE adapter?.clearSelection() + + binding.actionToolbar.hide() + (activity as? MainActivity)?.showBottomNav(visible = true, collapse = true) + actionMode = null }