This commit is contained in:
kunfei
2022-04-07 20:52:14 +08:00
parent d5e7d05e47
commit 0aa87f3fde
2 changed files with 0 additions and 3 deletions

View File

@@ -54,7 +54,6 @@ class BookInfoActivity :
viewModel.bookData.value?.let { book ->
launch {
withContext(IO) {
viewModel.durChapterIndex = it.first
book.durChapterIndex = it.first
book.durChapterPos = it.second
appDb.bookDao.update(book)

View File

@@ -27,7 +27,6 @@ import kotlinx.coroutines.Dispatchers.IO
class BookInfoViewModel(application: Application) : BaseViewModel(application) {
val bookData = MutableLiveData<Book>()
val chapterListData = MutableLiveData<List<BookChapter>>()
var durChapterIndex = 0
var inBookshelf = false
var bookSource: BookSource? = null
private var changeSourceCoroutine: Coroutine<*>? = null
@@ -70,7 +69,6 @@ class BookInfoViewModel(application: Application) : BaseViewModel(application) {
private fun upBook(book: Book) {
execute {
durChapterIndex = book.durChapterIndex
bookData.postValue(book)
upCoverByRule(book)
bookSource = if (book.isLocalBook()) null else