mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-25 02:21:49 +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) {
|
private fun setInsets(insets: WindowInsets, appbarHeight: Int, offset: Int) {
|
||||||
recycler.updatePaddingRelative(bottom = insets.systemWindowInsetBottom)
|
recycler?.updatePaddingRelative(bottom = insets.systemWindowInsetBottom)
|
||||||
tabletRecycler?.updatePaddingRelative(bottom = insets.systemWindowInsetBottom)
|
tabletRecycler?.updatePaddingRelative(bottom = insets.systemWindowInsetBottom)
|
||||||
headerHeight = appbarHeight + insets.systemWindowInsetTop
|
headerHeight = appbarHeight + insets.systemWindowInsetTop
|
||||||
swipe_refresh.setProgressViewOffset(false, (-40).dpToPx, headerHeight + offset)
|
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 =
|
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.anyUnread() && !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 &&
|
||||||
manga?.source != LocalSource.ID
|
manga?.source != LocalSource.ID
|
||||||
|
@ -320,7 +320,7 @@ class MangaDetailsPresenter(
|
|||||||
return chapters.sortedByDescending { it.source_order }.find { !it.read }
|
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 hasBookmark(): Boolean = chapters.any { it.bookmark }
|
||||||
fun hasDownloads(): Boolean = chapters.any { it.isDownloaded }
|
fun hasDownloads(): Boolean = chapters.any { it.isDownloaded }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user