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