From 4222e0a0fbf86b6c2a172627493847e1b976438f Mon Sep 17 00:00:00 2001 From: kunfei Date: Fri, 16 Aug 2019 22:11:09 +0800 Subject: [PATCH] up --- .../java/io/legado/app/ui/readbook/ReadBookActivity.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/readbook/ReadBookActivity.kt b/app/src/main/java/io/legado/app/ui/readbook/ReadBookActivity.kt index f8945670c..3ac82b10d 100644 --- a/app/src/main/java/io/legado/app/ui/readbook/ReadBookActivity.kt +++ b/app/src/main/java/io/legado/app/ui/readbook/ReadBookActivity.kt @@ -25,6 +25,7 @@ import io.legado.app.utils.* import kotlinx.android.synthetic.main.activity_read_book.* import kotlinx.android.synthetic.main.view_book_page.* import kotlinx.android.synthetic.main.view_title_bar.* +import kotlinx.coroutines.launch import org.jetbrains.anko.sdk27.listeners.onClick import org.jetbrains.anko.startActivity @@ -234,8 +235,10 @@ class ReadBookActivity : VMBaseActivity(R.layout.activity_rea } override fun loadContentFinish(bookChapter: BookChapter, content: String) { - val textChapter = ChapterProvider().getTextChapter(content_text_view, bookChapter, content) - print(textChapter.pages.size) + launch { + val textChapter = ChapterProvider().getTextChapter(content_text_view, bookChapter, content) + print(textChapter.pages.size) + } } override fun changeTo(book: Book) {