mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
Fix reader slider crash
This commit is contained in:
parent
c545578840
commit
331cd132af
1 changed files with 1 additions and 1 deletions
|
@ -1195,7 +1195,7 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>() {
|
|||
binding.chaptersSheet.chaptersBottomSheet.refreshList()
|
||||
}
|
||||
// Set seekbar progress
|
||||
binding.readerNav.pageSeekbar.valueTo = pages.lastIndex.toFloat()
|
||||
binding.readerNav.pageSeekbar.valueTo = max(pages.lastIndex.toFloat(), 1f)
|
||||
val progress = page.index + if (hasExtraPage) 1 else 0
|
||||
// For a double page, show the last 2 pages as if it was the final part of the seekbar
|
||||
binding.readerNav.pageSeekbar.value = (if (progress == pages.lastIndex) progress else page.index).toFloat()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue