Merge branch 'hotfix/v5.38.4-1114/GHZSCY-6927' into 'release'

fix: 深色模式下富文本指定颜色无法显示的问题 https://jira.shanqu.cc/browse/GHZSCY-6927

See merge request halo/android/assistant-android!1978
This commit is contained in:
陈君陶
2024-11-14 10:21:48 +08:00
2 changed files with 16 additions and 2 deletions

View File

@ -983,14 +983,17 @@ class DescAdapter(
setExpandMaxLines(maxDesLines)
setIsExpanded(Int.MAX_VALUE == maxDesLines)
if (customColumn.isHtmlDes == true) {
val decoratedDesBrief = (customColumn.desBrief ?: "").dropFontColorInDarkMode(contentTv.context)
val decoratedDes = (customColumn.des ?: "").dropFontColorInDarkMode(contentTv.context)
shrankSpanned = HtmlCompat.fromHtml(
customColumn.desBrief ?: "",
decoratedDesBrief,
HtmlCompat.FROM_HTML_MODE_COMPACT,
PicassoImageGetter(contentTv),
ExtraTagHandler()
)
expandedSpanned = HtmlCompat.fromHtml(
customColumn.des ?: "",
decoratedDes,
HtmlCompat.FROM_HTML_MODE_COMPACT,
PicassoImageGetter(contentTv),
ExtraTagHandler()