From edf0c9170c8d5cf81c4b83768c5c3561b7f4a8f8 Mon Sep 17 00:00:00 2001 From: kunfei Date: Fri, 21 Oct 2022 18:17:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/legado/app/api/controller/BookController.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/io/legado/app/api/controller/BookController.kt b/app/src/main/java/io/legado/app/api/controller/BookController.kt index 040b1a55f..92dd4c457 100644 --- a/app/src/main/java/io/legado/app/api/controller/BookController.kt +++ b/app/src/main/java/io/legado/app/api/controller/BookController.kt @@ -2,7 +2,6 @@ package io.legado.app.api.controller import androidx.core.graphics.drawable.toBitmap import io.legado.app.api.ReturnData -import io.legado.app.constant.PreferKey import io.legado.app.data.appDb import io.legado.app.data.entities.Book import io.legado.app.data.entities.BookProgress @@ -15,9 +14,9 @@ import io.legado.app.help.book.isLocal import io.legado.app.help.config.AppConfig import io.legado.app.help.glide.ImageLoader import io.legado.app.model.BookCover +import io.legado.app.model.ReadBook import io.legado.app.model.localBook.LocalBook import io.legado.app.model.webBook.WebBook -import io.legado.app.model.ReadBook import io.legado.app.ui.book.read.page.provider.ImageProvider import io.legado.app.utils.* import kotlinx.coroutines.delay @@ -201,7 +200,7 @@ object BookController { fun saveBook(postData: String?): ReturnData { val returnData = ReturnData() GSON.fromJsonObject(postData).getOrNull()?.let { book -> - book.save() + appDb.bookDao.update(book) AppWebDav.uploadBookProgress(book) return returnData.setData("") }