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 d392b0b4f..a2db71aa0 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 @@ -368,6 +368,14 @@ class ChaptersController : NucleusController(), } else { mode.title = count.toString() + val chapters = getSelectedChapters() + action_toolbar.findItem(R.id.action_download)?.isVisible = chapters.any { !it.isDownloaded } + action_toolbar.findItem(R.id.action_delete)?.isVisible = chapters.any { it.isDownloaded } + action_toolbar.findItem(R.id.action_bookmark)?.isVisible = chapters.any { !it.chapter.bookmark } + action_toolbar.findItem(R.id.action_remove_bookmark)?.isVisible = chapters.all { it.chapter.bookmark } + action_toolbar.findItem(R.id.action_mark_as_read)?.isVisible = chapters.any { !it.chapter.read } + action_toolbar.findItem(R.id.action_mark_as_unread)?.isVisible = chapters.all { it.chapter.read } + // Hide FAB to avoid interfering with the bottom action toolbar fab.hide() } 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 3e7119a60..2a602de73 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 @@ -296,6 +296,12 @@ class UpdatesController : NucleusController(), destroyActionModeIfNeeded() } else { mode.title = count.toString() + + val chapters = getSelectedChapters() + action_toolbar.findItem(R.id.action_download)?.isVisible = chapters.any { !it.isDownloaded } + action_toolbar.findItem(R.id.action_delete)?.isVisible = chapters.any { it.isDownloaded } + action_toolbar.findItem(R.id.action_mark_as_read)?.isVisible = chapters.any { !it.chapter.read } + action_toolbar.findItem(R.id.action_mark_as_unread)?.isVisible = chapters.all { it.chapter.read } } return false