fix toolbars

This commit is contained in:
jmir1 2022-01-05 13:42:52 +01:00
parent 81d158a860
commit a668832d63
2 changed files with 4 additions and 2 deletions

View file

@ -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 {

View file

@ -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 {