pull/32/head
kunfei 5 years ago
parent 2254cffef8
commit 62bd71ac25
  1. 6
      app/src/main/java/io/legado/app/ui/readbook/ReadBookViewModel.kt

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

Loading…
Cancel
Save