优化
This commit is contained in:
@@ -241,7 +241,7 @@ object ChapterProvider {
|
|||||||
if (durY > visibleHeight) {
|
if (durY > visibleHeight) {
|
||||||
val textPage = textPages.last()
|
val textPage = textPages.last()
|
||||||
textPage.height = durY
|
textPage.height = durY
|
||||||
textPage.text = stringBuilder.toString()
|
textPage.text = stringBuilder.toString().ifEmpty { "本页无文字内容" }
|
||||||
stringBuilder.clear()
|
stringBuilder.clear()
|
||||||
textPages.add(TextPage())
|
textPages.add(TextPage())
|
||||||
durY = 0f
|
durY = 0f
|
||||||
@@ -266,7 +266,7 @@ object ChapterProvider {
|
|||||||
if (durY + height > visibleHeight) {
|
if (durY + height > visibleHeight) {
|
||||||
val textPage = textPages.last()
|
val textPage = textPages.last()
|
||||||
textPage.height = durY
|
textPage.height = durY
|
||||||
textPage.text = stringBuilder.toString()
|
textPage.text = stringBuilder.toString().ifEmpty { "本页无文字内容" }
|
||||||
stringBuilder.clear()
|
stringBuilder.clear()
|
||||||
textPages.add(TextPage())
|
textPages.add(TextPage())
|
||||||
durY = 0f
|
durY = 0f
|
||||||
|
|||||||
Reference in New Issue
Block a user