feat: 修复bug

pull/238/head
gedoor 5 years ago
parent 2845e799cc
commit d28d87bfaa
  1. 2
      app/build.gradle
  2. 9
      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,9 +79,9 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) {
ReadBook.callBack?.upContent(resetPageOffset = false) ReadBook.callBack?.upContent(resetPageOffset = false)
} }
} }
if (ReadBook.inBookshelf) { }
ReadBook.saveRead() if (ReadBook.inBookshelf) {
} ReadBook.saveRead()
} }
} }

Loading…
Cancel
Save