Skip to content

Commit

Permalink
fix(*): Fix losing theme when munching html
Browse files Browse the repository at this point in the history
  • Loading branch information
realth000 committed Sep 7, 2024
1 parent 0d75905 commit b3fdd39
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- 帖子:修复帖子评分中头像无法加载时不显示且不断重试的问题。
- 帖子:修复用户资料中的腹黑显示为天然的问题。
- 帖子:修复滚动时偶现的白屏。
- 帖子:修复折叠/展开卡片上文字颜色错误的问题。
- 认证:修复登录页面刷新验证码时布局抖动的问题。
- 统计:修复积分统计中的积分值。
- 分区:修复开启帖子筛选条件时,显示没有置顶帖的问题。
Expand Down
8 changes: 4 additions & 4 deletions lib/utils/html/html_muncher.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Widget munchElement(BuildContext context, uh.Element rootElement) {
constraints: const BoxConstraints(
maxWidth: 712,
),
child: RichText(text: TextSpan(children: ret)),
child: Text.rich(TextSpan(children: ret)),
);
}

Expand Down Expand Up @@ -411,8 +411,8 @@ final class _Muncher with LoggerMixin {
child: Row(
children: [
Expanded(
child: RichText(
text: TextSpan(children: ret),
child: Text.rich(
TextSpan(children: ret),
textAlign: align,
),
),
Expand Down Expand Up @@ -859,7 +859,7 @@ final class _Muncher with LoggerMixin {
borderRadius: BorderRadius.all(Radius.circular(5)),
),
margin: EdgeInsets.zero,
child: RichText(text: TextSpan(children: ret)),
child: Text.rich(TextSpan(children: ret)),
),
);
state.elevation -= 1;
Expand Down
4 changes: 2 additions & 2 deletions lib/widgets/card/spoiler_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class _SpoilerCardState extends State<SpoilerCard> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
RichText(text: widget.title),
Text.rich(widget.title),
SizedBox(
width: sizeButtonInCardMinWidth,
child: FilledButton.icon(
Expand All @@ -61,7 +61,7 @@ class _SpoilerCardState extends State<SpoilerCard> {
},
),
),
if (_visible) RichText(text: widget.content),
if (_visible) Text.rich(widget.content),
].insertBetween(sizedBoxW4H4),
),
),
Expand Down

0 comments on commit b3fdd39

Please sign in to comment.