From 03baa21185f94541c8d1009163afb5ec83068621 Mon Sep 17 00:00:00 2001 From: arkon Date: Wed, 6 May 2020 23:21:17 -0400 Subject: [PATCH] Destroy action mode after actioning in chapters list (closes #3004) --- .../tachiyomi/ui/manga/chapter/ChaptersController.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersController.kt index ced45dc865..3e01079036 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersController.kt @@ -485,10 +485,12 @@ class ChaptersController : if (presenter.preferences.removeAfterMarkedAsRead()) { deleteChapters(chapters) } + destroyActionModeIfNeeded() } private fun markAsUnread(chapters: List) { presenter.markChaptersRead(chapters, false) + destroyActionModeIfNeeded() } private fun downloadChapters(chapters: List) { @@ -501,6 +503,7 @@ class ChaptersController : } } } + destroyActionModeIfNeeded() } private fun showDeleteChaptersConfirmationDialog() { @@ -518,16 +521,19 @@ class ChaptersController : if (chapterPos != -1) { markAsRead(prevChapters.take(chapterPos)) } + destroyActionModeIfNeeded() } private fun bookmarkChapters(chapters: List, bookmarked: Boolean) { presenter.bookmarkChapters(chapters, bookmarked) + destroyActionModeIfNeeded() } fun deleteChapters(chapters: List) { if (chapters.isEmpty()) return presenter.deleteChapters(chapters) + destroyActionModeIfNeeded() } fun onChaptersDeleted(chapters: List) { @@ -570,6 +576,7 @@ class ChaptersController : if (chaptersToDownload.isNotEmpty()) { downloadChapters(chaptersToDownload) } + destroyActionModeIfNeeded() } private fun showCustomDownloadDialog() {