From a668832d63606f1e479b04447927b27fa74f28fa Mon Sep 17 00:00:00 2001 From: jmir1 Date: Wed, 5 Jan 2022 13:42:52 +0100 Subject: [PATCH] fix toolbars --- .../main/java/eu/kanade/tachiyomi/ui/anime/AnimeController.kt | 4 +++- .../ui/recent/animeupdates/AnimeUpdatesController.kt | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/anime/AnimeController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/anime/AnimeController.kt index 3a5c6d9e5..f76cb9254 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/anime/AnimeController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/anime/AnimeController.kt @@ -1175,7 +1175,7 @@ class AnimeController : } override fun onCreateActionToolbar(menuInflater: MenuInflater, menu: Menu) { - menuInflater.inflate(R.menu.chapter_selection, menu) + menuInflater.inflate(R.menu.episode_selection, menu) } override fun onPrepareActionMode(mode: ActionMode, menu: Menu): Boolean { @@ -1201,6 +1201,8 @@ class AnimeController : toolbar.findToolbarItem(R.id.action_remove_bookmark)?.isVisible = episodes.all { it.episode.bookmark } toolbar.findToolbarItem(R.id.action_mark_as_read)?.isVisible = episodes.any { !it.episode.seen } toolbar.findToolbarItem(R.id.action_mark_as_unread)?.isVisible = episodes.all { it.episode.seen } + toolbar.findToolbarItem(R.id.action_play_externally)?.isVisible = !preferences.alwaysUseExternalPlayer() + toolbar.findToolbarItem(R.id.action_play_internally)?.isVisible = preferences.alwaysUseExternalPlayer() } override fun onActionItemClicked(mode: ActionMode, item: MenuItem): Boolean { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/animeupdates/AnimeUpdatesController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/animeupdates/AnimeUpdatesController.kt index b60fccf7a..72918c945 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/animeupdates/AnimeUpdatesController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/animeupdates/AnimeUpdatesController.kt @@ -351,7 +351,7 @@ class AnimeUpdatesController : } override fun onCreateActionToolbar(menuInflater: MenuInflater, menu: Menu) { - menuInflater.inflate(R.menu.updates_chapter_selection, menu) + menuInflater.inflate(R.menu.updates_episode_selection, menu) } override fun onPrepareActionMode(mode: ActionMode, menu: Menu): Boolean {