mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-10 13:05:11 +00:00
fix: render tg-forward as blockquote style
This commit is contained in:
parent
a5b5b1ae12
commit
3ef9854c1d
1 changed files with 14 additions and 9 deletions
|
@ -63,6 +63,16 @@ class HtmlMessage extends StatelessWidget {
|
||||||
|
|
||||||
final linkColor = textColor.withAlpha(150);
|
final linkColor = textColor.withAlpha(150);
|
||||||
|
|
||||||
|
final blockquoteStyle = Style(
|
||||||
|
border: Border(
|
||||||
|
left: BorderSide(
|
||||||
|
width: 3,
|
||||||
|
color: textColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
padding: HtmlPaddings.only(left: 6, bottom: 0),
|
||||||
|
);
|
||||||
|
|
||||||
// there is no need to pre-validate the html, as we validate it while rendering
|
// there is no need to pre-validate the html, as we validate it while rendering
|
||||||
return Html(
|
return Html(
|
||||||
data: linkifiedRenderHtml,
|
data: linkifiedRenderHtml,
|
||||||
|
@ -99,15 +109,8 @@ class HtmlMessage extends StatelessWidget {
|
||||||
fontSize: FontSize(fontSize),
|
fontSize: FontSize(fontSize),
|
||||||
lineHeight: LineHeight.number(1.5),
|
lineHeight: LineHeight.number(1.5),
|
||||||
),
|
),
|
||||||
'blockquote': Style(
|
'blockquote': blockquoteStyle,
|
||||||
border: Border(
|
'tg-forward': blockquoteStyle,
|
||||||
left: BorderSide(
|
|
||||||
width: 3,
|
|
||||||
color: textColor,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
padding: HtmlPaddings.only(left: 6, bottom: 0),
|
|
||||||
),
|
|
||||||
'hr': Style(
|
'hr': Style(
|
||||||
border: Border.all(color: textColor, width: 0.5),
|
border: Border.all(color: textColor, width: 0.5),
|
||||||
),
|
),
|
||||||
|
@ -191,6 +194,8 @@ class HtmlMessage extends StatelessWidget {
|
||||||
'ruby',
|
'ruby',
|
||||||
'rp',
|
'rp',
|
||||||
'rt',
|
'rt',
|
||||||
|
// Workaround for https://github.com/krille-chan/fluffychat/issues/507
|
||||||
|
'tg-forward',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue