fix wrapping of previews of unknown message types
This commit is contained in:
parent
a6f2f3072e
commit
54f2c93d92
1 changed files with 12 additions and 6 deletions
|
|
@ -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"),
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue