From 0eacc679bc72d87181a335631bf9d6026ce42de4 Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 16 May 2022 10:01:31 +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 --- app/src/main/java/io/legado/app/api/ReaderProvider.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/api/ReaderProvider.kt b/app/src/main/java/io/legado/app/api/ReaderProvider.kt index ad1efda57..74b9e38c3 100644 --- a/app/src/main/java/io/legado/app/api/ReaderProvider.kt +++ b/app/src/main/java/io/legado/app/api/ReaderProvider.kt @@ -21,7 +21,8 @@ class ReaderProvider : ContentProvider() { private enum class RequestCode { SaveBookSource, SaveBookSources, DeleteBookSources, GetBookSource, GetBookSources, SaveRssSource, SaveRssSources, DeleteRssSources, GetRssSource, GetRssSources, - SaveBook, GetBookshelf, RefreshToc, GetChapterList, GetBookContent, GetBookCover + SaveBook, GetBookshelf, RefreshToc, GetChapterList, GetBookContent, GetBookCover, + SaveBookProgress } private val postBodyKey = "json" @@ -86,6 +87,9 @@ class ReaderProvider : ContentProvider() { RequestCode.SaveBook -> values?.let { BookController.saveBook(values.getAsString(postBodyKey)) } + RequestCode.SaveBookProgress -> values?.let { + BookController.saveBookProgress(values.getAsString(postBodyKey)) + } else -> throw IllegalStateException( "Unexpected value: " + RequestCode.values()[sMatcher.match(uri)].name )