|
|
@ -251,34 +251,24 @@ class MessageContent extends StatelessWidget {
|
|
|
|
final bigEmotes = event.onlyEmotes &&
|
|
|
|
final bigEmotes = event.onlyEmotes &&
|
|
|
|
event.numberEmotes > 0 &&
|
|
|
|
event.numberEmotes > 0 &&
|
|
|
|
event.numberEmotes <= 10;
|
|
|
|
event.numberEmotes <= 10;
|
|
|
|
return FutureBuilder<String>(
|
|
|
|
return Linkify(
|
|
|
|
future: event.calcLocalizedBody(
|
|
|
|
text: event.calcLocalizedBodyFallback(
|
|
|
|
MatrixLocals(L10n.of(context)!),
|
|
|
|
MatrixLocals(L10n.of(context)!),
|
|
|
|
hideReply: true,
|
|
|
|
hideReply: true,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
builder: (context, snapshot) {
|
|
|
|
style: TextStyle(
|
|
|
|
return Linkify(
|
|
|
|
color: textColor,
|
|
|
|
text: snapshot.data ??
|
|
|
|
fontSize: bigEmotes ? fontSize * 3 : fontSize,
|
|
|
|
event.calcLocalizedBodyFallback(
|
|
|
|
decoration: event.redacted ? TextDecoration.lineThrough : null,
|
|
|
|
MatrixLocals(L10n.of(context)!),
|
|
|
|
),
|
|
|
|
hideReply: true,
|
|
|
|
options: const LinkifyOptions(humanize: false),
|
|
|
|
),
|
|
|
|
linkStyle: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
color: textColor.withAlpha(150),
|
|
|
|
color: textColor,
|
|
|
|
fontSize: bigEmotes ? fontSize * 3 : fontSize,
|
|
|
|
fontSize: bigEmotes ? fontSize * 3 : fontSize,
|
|
|
|
decoration: TextDecoration.underline,
|
|
|
|
decoration:
|
|
|
|
decorationColor: textColor.withAlpha(150),
|
|
|
|
event.redacted ? TextDecoration.lineThrough : null,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onOpen: (url) => UrlLauncher(context, url.url).launchUrl(),
|
|
|
|
options: const LinkifyOptions(humanize: false),
|
|
|
|
|
|
|
|
linkStyle: TextStyle(
|
|
|
|
|
|
|
|
color: textColor.withAlpha(150),
|
|
|
|
|
|
|
|
fontSize: bigEmotes ? fontSize * 3 : fontSize,
|
|
|
|
|
|
|
|
decoration: TextDecoration.underline,
|
|
|
|
|
|
|
|
decorationColor: textColor.withAlpha(150),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
onOpen: (url) => UrlLauncher(context, url.url).launchUrl(),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case EventTypes.CallInvite:
|
|
|
|
case EventTypes.CallInvite:
|
|
|
|