Skip to content

Commit

Permalink
fix toolbars
Browse files Browse the repository at this point in the history
  • Loading branch information
jmir1 committed Jan 5, 2022
1 parent 81d158a commit a668832
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit a668832

Please sign in to comment.