|
|
|
@ -35,6 +35,10 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) { |
|
|
|
|
} ?: App.db.bookDao().lastReadBook?.let { |
|
|
|
|
initBook(it) |
|
|
|
|
} |
|
|
|
|
}.onFinally { |
|
|
|
|
if (ReadBook.inBookshelf) { |
|
|
|
|
ReadBook.saveRead() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -80,9 +84,6 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (ReadBook.inBookshelf) { |
|
|
|
|
ReadBook.saveRead() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private fun loadBookInfo( |
|
|
|
|