fixup image rendering, prettier rendering for UTDs

This commit is contained in:
Henry Hiles 2026-05-19 11:00:59 -04:00
commit b71ebe5fee
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -69,8 +69,7 @@ class RenderEvent extends ConsumerWidget {
"An error occurred while parsing this event:\n$parseError\n${parseError.stackTrace}",
style: errorStyle,
),
EncryptedContent() => Text("Unable to decrypt event", style: errorStyle),
MessageContent() => Row(
MessageContent() || EncryptedContent() => Row(
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 8,
children: [
@ -127,6 +126,10 @@ class RenderEvent extends ConsumerWidget {
// EventText(replyEvent textOnly: true, maxLines: 1,)
// ),
switch (event.content) {
EncryptedContent() => Text(
"Unable to decrypt event",
style: errorStyle,
),
TextMessageContent(
:final body,
:final formattedBody,
@ -208,7 +211,6 @@ class RenderEvent extends ConsumerWidget {
headers: ref.headers,
),
width: info?.width,
height: info?.height,
loadingBuilder:
(_, child, loadingProgress) =>
loadingProgress == null