From 08ee858f64f6dbc9d71a6fc19c4c29f4acc884cb Mon Sep 17 00:00:00 2001 From: FourTOne5 <59261191+FourTOne5@users.noreply.github.com> Date: Wed, 2 Mar 2022 09:21:15 +0600 Subject: [PATCH] Adjust mark as unread and mark previous as read action visibility (#6703) --- .../main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt index c35dbb0eb..215b3e6cb 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt @@ -1061,7 +1061,8 @@ class MangaController : toolbar.findToolbarItem(R.id.action_bookmark)?.isVisible = chapters.any { !it.chapter.bookmark } toolbar.findToolbarItem(R.id.action_remove_bookmark)?.isVisible = chapters.all { it.chapter.bookmark } toolbar.findToolbarItem(R.id.action_mark_as_read)?.isVisible = chapters.any { !it.chapter.read } - toolbar.findToolbarItem(R.id.action_mark_as_unread)?.isVisible = chapters.all { it.chapter.read } + toolbar.findToolbarItem(R.id.action_mark_as_unread)?.isVisible = chapters.any { it.chapter.read } + toolbar.findToolbarItem(R.id.action_mark_previous_as_read)?.isVisible = chapters.size == 1 } override fun onActionItemClicked(mode: ActionMode, item: MenuItem): Boolean {