@ -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