mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-01 00:39:34 +01:00
chore: Prettier redacted events
This commit is contained in:
parent
f056e65d50
commit
d1e291ea76
@ -160,10 +160,30 @@ class MessageContent extends StatelessWidget {
|
|||||||
onPressed: () => launch(event.body),
|
onPressed: () => launch(event.body),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
final fontSize = DefaultTextStyle.of(context).style.fontSize;
|
||||||
|
if (event.redacted) {
|
||||||
|
return Row(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Icon(Icons.delete_forever_outlined),
|
||||||
|
SizedBox(width: 4),
|
||||||
|
Text(
|
||||||
|
event.getLocalizedBody(MatrixLocals(L10n.of(context)),
|
||||||
|
hideReply: true),
|
||||||
|
style: TextStyle(
|
||||||
|
color: textColor,
|
||||||
|
fontSize: fontSize,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
decoration: TextDecoration.lineThrough,
|
||||||
|
decorationThickness: 0.5,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
final bigEmotes = event.onlyEmotes &&
|
final bigEmotes = event.onlyEmotes &&
|
||||||
event.numberEmotes > 0 &&
|
event.numberEmotes > 0 &&
|
||||||
event.numberEmotes <= 10;
|
event.numberEmotes <= 10;
|
||||||
final fontSize = DefaultTextStyle.of(context).style.fontSize;
|
|
||||||
return LinkText(
|
return LinkText(
|
||||||
text: event.getLocalizedBody(MatrixLocals(L10n.of(context)),
|
text: event.getLocalizedBody(MatrixLocals(L10n.of(context)),
|
||||||
hideReply: true),
|
hideReply: true),
|
||||||
|
Loading…
Reference in New Issue
Block a user