Fix manga details toolbar icon visibility

This commit is contained in:
Jays2Kings 2021-04-27 14:37:28 -04:00
parent 36a22c9595
commit 797174843a

View File

@ -747,14 +747,14 @@ class MangaDetailsController :
val editItem = menu.findItem(R.id.action_edit) val editItem = menu.findItem(R.id.action_edit)
editItem.isVisible = presenter.manga.favorite && !presenter.isLockedFromSearch editItem.isVisible = presenter.manga.favorite && !presenter.isLockedFromSearch
menu.findItem(R.id.action_download).isVisible = !presenter.isLockedFromSearch && menu.findItem(R.id.action_download).isVisible = !presenter.isLockedFromSearch &&
presenter.manga.isLocal() !presenter.manga.isLocal()
menu.findItem(R.id.action_mark_all_as_read).isVisible = menu.findItem(R.id.action_mark_all_as_read).isVisible =
presenter.getNextUnreadChapter() != null && !presenter.isLockedFromSearch presenter.getNextUnreadChapter() != null && !presenter.isLockedFromSearch
menu.findItem(R.id.action_mark_all_as_unread).isVisible = menu.findItem(R.id.action_mark_all_as_unread).isVisible =
presenter.anyRead() && !presenter.isLockedFromSearch presenter.anyRead() && !presenter.isLockedFromSearch
menu.findItem(R.id.action_remove_downloads).isVisible = menu.findItem(R.id.action_remove_downloads).isVisible =
presenter.hasDownloads() && !presenter.isLockedFromSearch && presenter.hasDownloads() && !presenter.isLockedFromSearch &&
presenter.manga.isLocal() !presenter.manga.isLocal()
menu.findItem(R.id.remove_non_bookmarked).isVisible = menu.findItem(R.id.remove_non_bookmarked).isVisible =
presenter.hasBookmark() && !presenter.isLockedFromSearch presenter.hasBookmark() && !presenter.isLockedFromSearch
menu.findItem(R.id.action_migrate).isVisible = !presenter.isLockedFromSearch && menu.findItem(R.id.action_migrate).isVisible = !presenter.isLockedFromSearch &&