diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsController.kt index 8007eb1429..4f9b371e5a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsController.kt @@ -316,7 +316,7 @@ class MangaDetailsController : BaseController, } private fun setInsets(insets: WindowInsets, appbarHeight: Int, offset: Int) { - recycler.updatePaddingRelative(bottom = insets.systemWindowInsetBottom) + recycler?.updatePaddingRelative(bottom = insets.systemWindowInsetBottom) tabletRecycler?.updatePaddingRelative(bottom = insets.systemWindowInsetBottom) headerHeight = appbarHeight + insets.systemWindowInsetTop swipe_refresh.setProgressViewOffset(false, (-40).dpToPx, headerHeight + offset) @@ -823,7 +823,7 @@ class MangaDetailsController : BaseController, menu.findItem(R.id.action_mark_all_as_read).isVisible = presenter.getNextUnreadChapter() != null && !presenter.isLockedFromSearch menu.findItem(R.id.action_mark_all_as_unread).isVisible = - presenter.anyUnread() && !presenter.isLockedFromSearch + presenter.anyRead() && !presenter.isLockedFromSearch menu.findItem(R.id.action_remove_downloads).isVisible = presenter.hasDownloads() && !presenter.isLockedFromSearch && manga?.source != LocalSource.ID diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsPresenter.kt index 321fdce21b..c19c8a67d3 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsPresenter.kt @@ -320,7 +320,7 @@ class MangaDetailsPresenter( return chapters.sortedByDescending { it.source_order }.find { !it.read } } - fun anyUnread(): Boolean = chapters.any { !it.read } + fun anyRead(): Boolean = chapters.any { it.read } fun hasBookmark(): Boolean = chapters.any { it.bookmark } fun hasDownloads(): Boolean = chapters.any { it.isDownloaded }