From bae7094a796cbc96b3b820e8da29d3e09715d4ee Mon Sep 17 00:00:00 2001 From: gedoor Date: Sat, 2 Oct 2021 19:24:55 +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/config/ReadStyleDialog.kt | 1 + .../legado/app/ui/book/read/config/TextFontWeightConverter.kt | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) 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 7a377a6b9..93a2c7954 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 @@ -177,6 +177,7 @@ class ReadStyleDialog : BaseDialogFragment(), FontSelectDialog.CallBack { } private fun upView() = binding.run { + textFontWeightConverter.upUi(ReadBookConfig.textBold) ReadBook.pageAnim().let { if (it >= 0 && it < rgPageAnim.childCount) { rgPageAnim.check(rgPageAnim[it].id) diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/TextFontWeightConverter.kt b/app/src/main/java/io/legado/app/ui/book/read/config/TextFontWeightConverter.kt index 7b19c3bad..67e80f1d3 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/TextFontWeightConverter.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/TextFontWeightConverter.kt @@ -29,7 +29,8 @@ class TextFontWeightConverter(context: Context, attrs: AttributeSet?) : } } - private fun upUi(type: Int) { + @Suppress("MemberVisibilityCanBePrivate") + fun upUi(type: Int) { spannableString.removeSpan(enabledSpan) when (type) { 0 -> spannableString.setSpan(enabledSpan, 0, 1, Spannable.SPAN_INCLUSIVE_EXCLUSIVE)