diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt index 68a1d11aa..f29c4ddba 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt @@ -108,7 +108,7 @@ class ReadStyleDialog : DialogFragment(), FontSelectDialog.CallBack { textBold = !textBold tv_text_bold.isSelected = textBold } - postEvent(EventBus.UP_CONFIG, false) + postEvent(EventBus.UP_CONFIG, true) } tv_text_font.onClick { FontSelectDialog().show(childFragmentManager, "fontSelectDialog") diff --git a/app/src/main/java/io/legado/app/web/HttpServer.kt b/app/src/main/java/io/legado/app/web/HttpServer.kt index 4f28db10b..7afcd6c25 100644 --- a/app/src/main/java/io/legado/app/web/HttpServer.kt +++ b/app/src/main/java/io/legado/app/web/HttpServer.kt @@ -47,10 +47,10 @@ class HttpServer(port: Int) : NanoHTTPD(port) { "/getSource" -> returnData = SourceController().getSource(parameters) "/getSources" -> returnData = SourceController().sources "/getBookshelf" -> returnData = BookshelfController().bookshelf - "/getChapterList" -> returnData = - BookshelfController().getChapterList(parameters) - "/getBookContent" -> returnData = - BookshelfController().getBookContent(parameters) + "/getChapterList" -> + returnData = BookshelfController().getChapterList(parameters) + "/getBookContent" -> + returnData = BookshelfController().getBookContent(parameters) } } } diff --git a/app/src/main/java/io/legado/app/web/controller/BookshelfController.kt b/app/src/main/java/io/legado/app/web/controller/BookshelfController.kt index 961407998..6f6dbbd4b 100644 --- a/app/src/main/java/io/legado/app/web/controller/BookshelfController.kt +++ b/app/src/main/java/io/legado/app/web/controller/BookshelfController.kt @@ -37,7 +37,7 @@ class BookshelfController { return returnData.setErrorMsg("参数url不能为空,请指定内容地址") } val book = App.db.bookDao().getBook(strings[0]) - val chapter = App.db.bookChapterDao().getChapter(strings[0], strings[1].toInt()) + val chapter = App.db.bookChapterDao().getChapter(strings[0], 1) if (book == null || chapter == null) { returnData.setErrorMsg("未找到") } else {