正文标题不隐藏的情况下才隐藏第一页页眉的标题

pull/1514/head
Xwite 4 years ago
parent 3120b4c4d5
commit 89eb3e959a
  1. 3
      app/src/main/java/io/legado/app/ui/book/read/page/PageView.kt
  2. 2
      app/src/main/java/io/legado/app/ui/book/read/page/provider/ChapterProvider.kt

@ -226,7 +226,8 @@ class PageView(context: Context) : FrameLayout(context) {
@SuppressLint("SetTextI18n")
fun setProgress(textPage: TextPage) = textPage.apply {
tvBookName?.text = ReadBook.book?.name
tvTitle?.text = textPage.title
val hideTitle = ReadBookConfig.titleMode != 2 && textPage.index == 0
tvTitle?.text = if (hideTitle) "" else textPage.title
tvPage?.text = "${index.plus(1)}/$pageSize"
tvTotalProgress?.text = readProgress
tvPageAndTotal?.text = "${index.plus(1)}/$pageSize $readProgress"

@ -191,7 +191,7 @@ object ChapterProvider {
item.pageSize = textPages.size
item.chapterIndex = bookChapter.index
item.chapterSize = chapterSize
item.title = index == 0 ? '' : displayTitle
item.title = displayTitle
item.upLinesPosition()
}

Loading…
Cancel
Save