Update ReadBookViewModel.kt

pull/2578/head
Xwite 2 years ago committed by GitHub
parent 04d60f3a46
commit 09580efc80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt

@ -186,13 +186,10 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) {
book: Book,
alertSync: ((progress: BookProgress) -> Unit)? = null
) {
if (!AppWebDav.syncBookProgress) return
execute {
if (AppWebDav.syncBookProgress) {
AppWebDav.getBookProgress(book)
?: throw NoStackTraceException("没有进度")
} else {
throw NoStackTraceException("进度同步未启用")
}
}.onError {
AppLog.put("拉取阅读进度失败", it)
}.onSuccess { progress ->

Loading…
Cancel
Save