pull/1630/head
821938089 3 years ago
parent 17697670a8
commit d45e8ab31b
  1. 4
      app/src/main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt

@ -224,7 +224,7 @@ class BookInfoViewModel(application: Application) : BaseViewModel(application) {
execute { execute {
bookData.value?.let { book -> bookData.value?.let { book ->
if (book.order == 0) { if (book.order == 0) {
book.order = appDb.bookDao.maxOrder + 1 book.order = appDb.bookDao.minOrder - 1
} }
appDb.bookDao.getBook(book.name, book.author)?.let { appDb.bookDao.getBook(book.name, book.author)?.let {
book.durChapterPos = it.durChapterPos book.durChapterPos = it.durChapterPos
@ -254,7 +254,7 @@ class BookInfoViewModel(application: Application) : BaseViewModel(application) {
execute { execute {
bookData.value?.let { book -> bookData.value?.let { book ->
if (book.order == 0) { if (book.order == 0) {
book.order = appDb.bookDao.maxOrder + 1 book.order = appDb.bookDao.minOrder - 1
} }
appDb.bookDao.getBook(book.name, book.author)?.let { appDb.bookDao.getBook(book.name, book.author)?.let {
book.durChapterPos = it.durChapterPos book.durChapterPos = it.durChapterPos

Loading…
Cancel
Save