From fa6b84589eecaf29730738913cdd6a27006c173b Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 8 Mar 2020 10:32:51 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/legado/app/ui/book/read/config/ReadStyleDialog.kt | 2 +- app/src/main/java/io/legado/app/web/HttpServer.kt | 8 ++++---- .../io/legado/app/web/controller/BookshelfController.kt | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) 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 {