fix wrapping of previews of unknown message types

This commit is contained in:
Henry Hiles 2026-11-19 20:13:28 -05:00
commit 54f2c93d92
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -143,13 +143,19 @@ class const MessageRenderer(
UnknownMessageContent(:final body) =>
body == null
? Text("This message is redacted", style: errorStyle)
: Wrap(
spacing: 8,
: Text.rich(
TextSpan(
children: [
Text("Unknown message type:", style: errorStyle),
Text(body),
TextSpan(
text: "Unknown message type: ",
style: errorStyle,
),
TextSpan(text: body),
],
),
maxLines: maxLines,
overflow: maxLines == null ? null : .ellipsis,
),
},
_ => throw Exception("This is impossible"),
};