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