From 09c8018e44a901a83f66cbd0650400ac190e1eb0 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sat, 2 Nov 2019 17:23:07 +0800 Subject: [PATCH] up --- .../main/java/io/legado/app/ui/audio/AudioPlayViewModel.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/audio/AudioPlayViewModel.kt b/app/src/main/java/io/legado/app/ui/audio/AudioPlayViewModel.kt index 3a340f617..4a455ab53 100644 --- a/app/src/main/java/io/legado/app/ui/audio/AudioPlayViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/audio/AudioPlayViewModel.kt @@ -16,7 +16,6 @@ import kotlinx.coroutines.Dispatchers class AudioPlayViewModel(application: Application) : BaseViewModel(application) { var inBookshelf = false var bookData = MutableLiveData() - val chapterListFinish = MutableLiveData() var chapterSize = 0 var callBack: ReadBookViewModel.CallBack? = null var durChapterIndex = 0 @@ -53,7 +52,7 @@ class AudioPlayViewModel(application: Application) : BaseViewModel(application) durChapterIndex = count - 1 } chapterSize = count - chapterListFinish.postValue(true) + callBack?.loadContent() } } saveRead(book) @@ -83,7 +82,7 @@ class AudioPlayViewModel(application: Application) : BaseViewModel(application) if (changeDruChapterIndex == null) { App.db.bookChapterDao().insert(*cList.toTypedArray()) chapterSize = cList.size - chapterListFinish.postValue(true) + callBack?.loadContent() } else { changeDruChapterIndex(cList) }