feat: 优化

pull/209/head
kunfei 5 years ago
parent 4501ac792b
commit d2a6a7beb6
  1. 1
      app/src/main/assets/updateLog.md
  2. 4
      app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt

@ -5,6 +5,7 @@
**2020/05/02**
* 修复不停换源的bug
* 修复本地书籍自动换源
**2020/05/01**
* 尝试修复朗读时可能错位的bug

@ -41,7 +41,7 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) {
private fun initBook(book: Book) {
if (ReadBook.book?.bookUrl != book.bookUrl) {
ReadBook.resetData(book)
if (ReadBook.webBook == null) {
if (!book.isLocalBook() && ReadBook.webBook == null) {
autoChangeSource(book.name, book.author)
return
}
@ -66,7 +66,7 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) {
isInitFinish = true
ReadBook.titleDate.postValue(book.name)
ReadBook.upWebBook(book)
if (ReadBook.webBook == null) {
if (!book.isLocalBook() && ReadBook.webBook == null) {
autoChangeSource(book.name, book.author)
return
}

Loading…
Cancel
Save