优化
This commit is contained in:
@@ -858,6 +858,7 @@ object ReadBook : CoroutineScope by MainScope() {
|
|||||||
|
|
||||||
fun saveRead(pageChanged: Boolean = false) {
|
fun saveRead(pageChanged: Boolean = false) {
|
||||||
executor.execute {
|
executor.execute {
|
||||||
|
kotlin.runCatching {
|
||||||
val book = book ?: return@execute
|
val book = book ?: return@execute
|
||||||
book.lastCheckCount = 0
|
book.lastCheckCount = 0
|
||||||
book.durChapterTime = System.currentTimeMillis()
|
book.durChapterTime = System.currentTimeMillis()
|
||||||
@@ -873,6 +874,9 @@ object ReadBook : CoroutineScope by MainScope() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
appDb.bookDao.update(book)
|
appDb.bookDao.update(book)
|
||||||
|
}.onFailure {
|
||||||
|
AppLog.put("保存书籍阅读进度信息出错\n$it", it)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -327,6 +327,7 @@ object ReadManga : CoroutineScope by MainScope() {
|
|||||||
|
|
||||||
fun saveRead(pageChanged: Boolean = false) {
|
fun saveRead(pageChanged: Boolean = false) {
|
||||||
executor.execute {
|
executor.execute {
|
||||||
|
kotlin.runCatching {
|
||||||
val book = book ?: return@execute
|
val book = book ?: return@execute
|
||||||
book.lastCheckCount = 0
|
book.lastCheckCount = 0
|
||||||
book.durChapterTime = System.currentTimeMillis()
|
book.durChapterTime = System.currentTimeMillis()
|
||||||
@@ -342,6 +343,9 @@ object ReadManga : CoroutineScope by MainScope() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
appDb.bookDao.update(book)
|
appDb.bookDao.update(book)
|
||||||
|
}.onFailure {
|
||||||
|
AppLog.put("保存漫画阅读进度信息出错\n$it", it)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user