mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-13 01:15:06 +01:00
Fixed mark as unread not showing
This commit is contained in:
parent
25daf1919a
commit
54a0c3fded
@ -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
|
||||
|
@ -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 }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user