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) =>
|
UnknownMessageContent(:final body) =>
|
||||||
body == null
|
body == null
|
||||||
? Text("This message is redacted", style: errorStyle)
|
? Text("This message is redacted", style: errorStyle)
|
||||||
: Wrap(
|
: Text.rich(
|
||||||
spacing: 8,
|
TextSpan(
|
||||||
children: [
|
children: [
|
||||||
Text("Unknown message type:", style: errorStyle),
|
TextSpan(
|
||||||
Text(body),
|
text: "Unknown message type: ",
|
||||||
|
style: errorStyle,
|
||||||
|
),
|
||||||
|
TextSpan(text: body),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
maxLines: maxLines,
|
||||||
|
overflow: maxLines == null ? null : .ellipsis,
|
||||||
|
),
|
||||||
},
|
},
|
||||||
_ => throw Exception("This is impossible"),
|
_ => throw Exception("This is impossible"),
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue