mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
parent
1f136c3eb2
commit
31654d1bb8
1 changed files with 13 additions and 1 deletions
|
@ -223,6 +223,13 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>() {
|
|||
field = value
|
||||
(viewer as? PagerViewer)?.config?.hingeGapSize = value
|
||||
}
|
||||
val decimalFormat by lazy {
|
||||
DecimalFormat(
|
||||
"#.###",
|
||||
DecimalFormatSymbols()
|
||||
.apply { decimalSeparator = '.' },
|
||||
)
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
|
@ -1239,7 +1246,12 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>() {
|
|||
viewer?.setChapters(viewerChapters)
|
||||
intentPageNumber?.let { moveToPageIndex(it) }
|
||||
intentPageNumber = null
|
||||
binding.toolbar.subtitle = viewerChapters.currChapter.chapter.name
|
||||
binding.toolbar.subtitle = if (presenter.manga!!.hideChapterTitle(preferences)) {
|
||||
val number = decimalFormat.format(viewerChapters.currChapter.chapter.chapter_number.toDouble())
|
||||
getString(R.string.chapter_, number)
|
||||
} else {
|
||||
viewerChapters.currChapter.chapter.name
|
||||
}
|
||||
if (viewerChapters.nextChapter == null && viewerChapters.prevChapter == null) {
|
||||
binding.readerNav.leftChapter.isVisible = false
|
||||
binding.readerNav.rightChapter.isVisible = false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue