pull/32/head
kunfei 5 years ago
parent 88e1a4023a
commit 45fe6caea5
  1. 2
      app/src/main/java/io/legado/app/ui/readbook/ReadBookActivity.kt
  2. 4
      app/src/main/java/io/legado/app/ui/widget/page/ChapterProvider.kt

@ -237,7 +237,7 @@ class ReadBookActivity : VMBaseActivity<ReadBookViewModel>(R.layout.activity_rea
override fun loadContentFinish(bookChapter: BookChapter, content: String) {
launch {
val textChapter = ChapterProvider().getTextChapter(content_text_view, bookChapter, content)
val textChapter = ChapterProvider.getTextChapter(content_text_view, bookChapter, content)
content_text_view.text = textChapter.pages[0].text
}
}

@ -3,9 +3,9 @@ package io.legado.app.ui.widget.page
import io.legado.app.data.entities.BookChapter
class ChapterProvider {
object ChapterProvider {
@Synchronized
fun getTextChapter(textView: ContentTextView, bookChapter: BookChapter, content: String): TextChapter {
val textPages = arrayListOf<TextPage>()
var surplusText = content

Loading…
Cancel
Save