pull/1894/head^2
kunfei 3 years ago
parent f554c2ec06
commit 0eacc679bc
  1. 6
      app/src/main/java/io/legado/app/api/ReaderProvider.kt

@ -21,7 +21,8 @@ class ReaderProvider : ContentProvider() {
private enum class RequestCode { private enum class RequestCode {
SaveBookSource, SaveBookSources, DeleteBookSources, GetBookSource, GetBookSources, SaveBookSource, SaveBookSources, DeleteBookSources, GetBookSource, GetBookSources,
SaveRssSource, SaveRssSources, DeleteRssSources, GetRssSource, GetRssSources, SaveRssSource, SaveRssSources, DeleteRssSources, GetRssSource, GetRssSources,
SaveBook, GetBookshelf, RefreshToc, GetChapterList, GetBookContent, GetBookCover SaveBook, GetBookshelf, RefreshToc, GetChapterList, GetBookContent, GetBookCover,
SaveBookProgress
} }
private val postBodyKey = "json" private val postBodyKey = "json"
@ -86,6 +87,9 @@ class ReaderProvider : ContentProvider() {
RequestCode.SaveBook -> values?.let { RequestCode.SaveBook -> values?.let {
BookController.saveBook(values.getAsString(postBodyKey)) BookController.saveBook(values.getAsString(postBodyKey))
} }
RequestCode.SaveBookProgress -> values?.let {
BookController.saveBookProgress(values.getAsString(postBodyKey))
}
else -> throw IllegalStateException( else -> throw IllegalStateException(
"Unexpected value: " + RequestCode.values()[sMatcher.match(uri)].name "Unexpected value: " + RequestCode.values()[sMatcher.match(uri)].name
) )

Loading…
Cancel
Save