From e866cc95d9df6851916b05ad2f6096c54ed5273b Mon Sep 17 00:00:00 2001 From: Horis <8674809+821938089@users.noreply.github.com> Date: Sun, 1 Sep 2024 23:18:29 +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 --- .../java/io/legado/app/ui/book/read/ReadBookActivity.kt | 6 ++++++ .../io/legado/app/ui/book/read/config/ReadStyleDialog.kt | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt b/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt index 1b8fb8f75e65..dd75a8d5fc03 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt @@ -1356,11 +1356,17 @@ class ReadBookActivity : BaseReadBookActivity(), TEXT_COLOR -> { setCurTextColor(color) postEvent(EventBus.UP_CONFIG, arrayListOf(2, 6, 9, 11)) + if (AppConfig.readBarStyleFollowPage) { + postEvent(EventBus.UPDATE_READ_ACTION_BAR, true) + } } BG_COLOR -> { setCurBg(0, "#${color.hexString}") postEvent(EventBus.UP_CONFIG, arrayListOf(1)) + if (AppConfig.readBarStyleFollowPage) { + postEvent(EventBus.UPDATE_READ_ACTION_BAR, true) + } } TIP_COLOR -> { 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 a8bfe064c9a9..0089967662d6 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 @@ -15,6 +15,7 @@ import io.legado.app.base.adapter.RecyclerAdapter import io.legado.app.constant.EventBus import io.legado.app.databinding.DialogReadBookStyleBinding import io.legado.app.databinding.ItemReadStyleBinding +import io.legado.app.help.config.AppConfig import io.legado.app.help.config.ReadBookConfig import io.legado.app.lib.dialogs.selector import io.legado.app.lib.theme.accentColor @@ -169,6 +170,9 @@ class ReadStyleDialog : BaseDialogFragment(R.layout.dialog_read_book_style), styleAdapter.notifyItemChanged(oldIndex) styleAdapter.notifyItemChanged(index) postEvent(EventBus.UP_CONFIG, arrayListOf(1, 2, 5)) + if (AppConfig.readBarStyleFollowPage) { + postEvent(EventBus.UPDATE_READ_ACTION_BAR, true) + } } }