mirror of
https://github.com/gedoor/legado.git
synced 2024-08-30 09:23:26 +08:00
优化
This commit is contained in:
parent
a6a416b02c
commit
24f25f9b32
@ -217,7 +217,7 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) {
|
|||||||
AppWebDav.getBookProgress(book)
|
AppWebDav.getBookProgress(book)
|
||||||
?: throw NoStackTraceException("没有进度")
|
?: throw NoStackTraceException("没有进度")
|
||||||
}.onError {
|
}.onError {
|
||||||
AppLog.put("拉取阅读进度失败", it)
|
AppLog.put("拉取阅读进度失败《${book.name}》", it)
|
||||||
}.onSuccess { progress ->
|
}.onSuccess { progress ->
|
||||||
if (progress.durChapterIndex < book.durChapterIndex ||
|
if (progress.durChapterIndex < book.durChapterIndex ||
|
||||||
(progress.durChapterIndex == book.durChapterIndex
|
(progress.durChapterIndex == book.durChapterIndex
|
||||||
@ -226,7 +226,7 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) {
|
|||||||
alertSync?.invoke(progress)
|
alertSync?.invoke(progress)
|
||||||
} else {
|
} else {
|
||||||
ReadBook.setProgress(progress)
|
ReadBook.setProgress(progress)
|
||||||
AppLog.put("自动同步阅读进度成功")
|
AppLog.put("自动同步阅读进度成功《${book.name}》 ${progress.durChapterTitle}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user