正文内容为空 标题居中

pull/1568/head
Xwite 3 years ago
parent d1b84c433c
commit 4d7a84ed94
  1. 6
      app/src/main/java/io/legado/app/ui/book/read/page/provider/ChapterProvider.kt

@ -129,7 +129,7 @@ object ChapterProvider {
matcher.appendTail(sb) matcher.appendTail(sb)
text = sb.toString() text = sb.toString()
val isTitle = index == 0 val isTitle = index == 0
val isVolumeTitle = bookChapter.isVolume && isTitle && contents.size == 1 val isVolumeTitle = isTitle && contents.size == 1
val textPaint = if (isTitle) titlePaint else contentPaint val textPaint = if (isTitle) titlePaint else contentPaint
if (!(isTitle && ReadBookConfig.titleMode == 2)) { if (!(isTitle && ReadBookConfig.titleMode == 2)) {
setTypeText( setTypeText(
@ -147,7 +147,7 @@ object ChapterProvider {
val text = content.substring(start, matcher.start()) val text = content.substring(start, matcher.start())
if (text.isNotBlank()) { if (text.isNotBlank()) {
val isTitle = index == 0 val isTitle = index == 0
val isVolumeTitle = bookChapter.isVolume && isTitle && contents.size == 1 val isVolumeTitle = isTitle && contents.size == 1
val textPaint = if (isTitle) titlePaint else contentPaint val textPaint = if (isTitle) titlePaint else contentPaint
if (!(isTitle && ReadBookConfig.titleMode == 2)) { if (!(isTitle && ReadBookConfig.titleMode == 2)) {
setTypeText( setTypeText(
@ -169,7 +169,7 @@ object ChapterProvider {
val text = content.substring(start, content.length) val text = content.substring(start, content.length)
if (text.isNotBlank()) { if (text.isNotBlank()) {
val isTitle = index == 0 val isTitle = index == 0
val isVolumeTitle = bookChapter.isVolume && isTitle && contents.size == 1 val isVolumeTitle = isTitle && contents.size == 1
val textPaint = if (isTitle) titlePaint else contentPaint val textPaint = if (isTitle) titlePaint else contentPaint
if (!(isTitle && ReadBookConfig.titleMode == 2)) { if (!(isTitle && ReadBookConfig.titleMode == 2)) {
setTypeText( setTypeText(

Loading…
Cancel
Save