Skip to content

Commit

Permalink
优化
Browse files Browse the repository at this point in the history
  • Loading branch information
821938089 committed Sep 1, 2024
1 parent 9141561 commit e866cc9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
}
}
}

Expand Down

0 comments on commit e866cc9

Please sign in to comment.