|
|
@ -13,6 +13,7 @@ import io.legado.app.data.entities.BookChapter |
|
|
|
import io.legado.app.data.entities.BookSource |
|
|
|
import io.legado.app.data.entities.BookSource |
|
|
|
import io.legado.app.help.BookHelp |
|
|
|
import io.legado.app.help.BookHelp |
|
|
|
import io.legado.app.model.WebBook |
|
|
|
import io.legado.app.model.WebBook |
|
|
|
|
|
|
|
import io.legado.app.service.ReadAloudService |
|
|
|
import io.legado.app.ui.widget.page.TextChapter |
|
|
|
import io.legado.app.ui.widget.page.TextChapter |
|
|
|
import kotlinx.coroutines.Dispatchers.IO |
|
|
|
import kotlinx.coroutines.Dispatchers.IO |
|
|
|
|
|
|
|
|
|
|
@ -133,6 +134,11 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override fun onCleared() { |
|
|
|
|
|
|
|
super.onCleared() |
|
|
|
|
|
|
|
ReadAloudService.stop(context) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
interface CallBack { |
|
|
|
interface CallBack { |
|
|
|
fun loadContentFinish(bookChapter: BookChapter, content: String) |
|
|
|
fun loadContentFinish(bookChapter: BookChapter, content: String) |
|
|
|
} |
|
|
|
} |
|
|
|