From a7ece4fdf354b2a7ee438dcc4fa9058db4642f6c Mon Sep 17 00:00:00 2001 From: arkon Date: Sun, 16 Feb 2020 17:46:31 -0500 Subject: [PATCH] Add bookmarking to chapter selection menu (closes #1065) --- .../tachiyomi/ui/manga/chapter/ChaptersController.kt | 10 ++++++---- app/src/main/res/menu/chapter_selection.xml | 10 ++++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) 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 601501405a..e4903f65f2 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 @@ -362,11 +362,13 @@ class ChaptersController : NucleusController(), override fun onActionItemClicked(mode: ActionMode, item: MenuItem): Boolean { when (item.itemId) { - R.id.action_select_all -> selectAll() - R.id.action_mark_as_read -> markAsRead(getSelectedChapters()) - R.id.action_mark_as_unread -> markAsUnread(getSelectedChapters()) R.id.action_download -> downloadChapters(getSelectedChapters()) R.id.action_delete -> showDeleteChaptersConfirmationDialog() + R.id.action_bookmark -> bookmarkChapters(getSelectedChapters(), true) + R.id.action_remove_bookmark -> bookmarkChapters(getSelectedChapters(), false) + R.id.action_mark_as_read -> markAsRead(getSelectedChapters()) + R.id.action_mark_as_unread -> markAsUnread(getSelectedChapters()) + R.id.action_select_all -> selectAll() else -> return false } return true @@ -390,9 +392,9 @@ class ChaptersController : NucleusController(), when (item.itemId) { R.id.action_download -> downloadChapters(chapters) + R.id.action_delete -> deleteChapters(chapters) R.id.action_bookmark -> bookmarkChapters(chapters, true) R.id.action_remove_bookmark -> bookmarkChapters(chapters, false) - R.id.action_delete -> deleteChapters(chapters) R.id.action_mark_as_read -> markAsRead(chapters) R.id.action_mark_as_unread -> markAsUnread(chapters) R.id.action_mark_previous_as_read -> markPreviousAsRead(chapter) diff --git a/app/src/main/res/menu/chapter_selection.xml b/app/src/main/res/menu/chapter_selection.xml index 3ccfc69491..7951ce63ec 100644 --- a/app/src/main/res/menu/chapter_selection.xml +++ b/app/src/main/res/menu/chapter_selection.xml @@ -15,6 +15,16 @@ android:title="@string/action_delete" app:showAsAction="ifRoom" /> + + + +