feat: 修复bug

pull/238/head
gedoor 5 years ago
parent 2845e799cc
commit d28d87bfaa
  1. 2
      app/build.gradle
  2. 5
      app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt

@ -116,7 +116,7 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
//fireBase //fireBase
implementation 'com.google.firebase:firebase-core:17.4.2' implementation 'com.google.firebase:firebase-core:17.4.3'
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1' implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
//androidX //androidX

@ -59,9 +59,6 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) {
} }
ReadBook.loadContent(resetPageOffset = true) ReadBook.loadContent(resetPageOffset = true)
} }
if (ReadBook.inBookshelf) {
ReadBook.saveRead()
}
} else { } else {
isInitFinish = true isInitFinish = true
ReadBook.titleDate.postValue(book.name) ReadBook.titleDate.postValue(book.name)
@ -82,11 +79,11 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) {
ReadBook.callBack?.upContent(resetPageOffset = false) ReadBook.callBack?.upContent(resetPageOffset = false)
} }
} }
}
if (ReadBook.inBookshelf) { if (ReadBook.inBookshelf) {
ReadBook.saveRead() ReadBook.saveRead()
} }
} }
}
private fun loadBookInfo( private fun loadBookInfo(
book: Book, book: Book,

Loading…
Cancel
Save