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)