feat: Display emotes/emojis bigger
This commit is contained in:
@ -49,13 +49,16 @@ class MessageContent extends StatelessWidget {
|
||||
if (event.messageType == MessageTypes.Emote) {
|
||||
html = '* $html';
|
||||
}
|
||||
final bigEmotes = event.onlyEmotes && event.numberEmotes <= 10;
|
||||
final fontSize = DefaultTextStyle.of(context).style.fontSize;
|
||||
return HtmlMessage(
|
||||
html: html,
|
||||
defaultTextStyle: TextStyle(
|
||||
color: textColor,
|
||||
fontSize: DefaultTextStyle.of(context).style.fontSize,
|
||||
fontSize: bigEmotes ? fontSize * 3 : fontSize,
|
||||
),
|
||||
room: event.room,
|
||||
emoteSize: bigEmotes ? fontSize * 3 : fontSize * 1.5,
|
||||
);
|
||||
}
|
||||
// else we fall through to the normal message rendering
|
||||
@ -78,11 +81,13 @@ class MessageContent extends StatelessWidget {
|
||||
onPressed: () => launch(event.body),
|
||||
);
|
||||
}
|
||||
final bigEmotes = event.onlyEmotes && event.numberEmotes <= 10;
|
||||
final fontSize = DefaultTextStyle.of(context).style.fontSize;
|
||||
return LinkText(
|
||||
text: event.getLocalizedBody(L10n.of(context), hideReply: true),
|
||||
textStyle: TextStyle(
|
||||
color: textColor,
|
||||
fontSize: DefaultTextStyle.of(context).style.fontSize,
|
||||
fontSize: bigEmotes ? fontSize * 3 : fontSize,
|
||||
decoration: event.redacted ? TextDecoration.lineThrough : null,
|
||||
),
|
||||
onLinkTap: (url) => UrlLauncher(context, url).launchUrl(),
|
||||
|
Reference in New Issue
Block a user