pull/1212/head
gedoor 3 years ago
parent 3465a79349
commit 24f8996969
  1. 1
      app/src/main/java/io/legado/app/ui/book/audio/AudioPlayViewModel.kt
  2. 1
      app/src/main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt
  3. 1
      app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt

@ -100,6 +100,7 @@ class AudioPlayViewModel(application: Application) : BaseViewModel(application)
} else { } else {
loadChapterList(book1) { upChangeDurChapterIndex(book1, oldTocSize, it) } loadChapterList(book1) { upChangeDurChapterIndex(book1, oldTocSize, it) }
} }
}.onFinally {
postEvent(EventBus.SOURCE_CHANGED, book1.bookUrl) postEvent(EventBus.SOURCE_CHANGED, book1.bookUrl)
} }
} }

@ -169,6 +169,7 @@ class BookInfoViewModel(application: Application) : BaseViewModel(application) {
upChangeDurChapterIndex(newBook, oldTocSize, it) upChangeDurChapterIndex(newBook, oldTocSize, it)
} }
} }
}.onFinally {
postEvent(EventBus.SOURCE_CHANGED, newBook.bookUrl) postEvent(EventBus.SOURCE_CHANGED, newBook.bookUrl)
} }
} }

@ -209,6 +209,7 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) {
upChangeDurChapterIndex(newBook, oldTocSize, it) upChangeDurChapterIndex(newBook, oldTocSize, it)
} }
} }
}.onFinally {
postEvent(EventBus.SOURCE_CHANGED, newBook.bookUrl) postEvent(EventBus.SOURCE_CHANGED, newBook.bookUrl)
} }
} }

Loading…
Cancel
Save