Watch
1
0
Fork
You've already forked nexus
0
forked from Nexus/nexus

fixes for some overflows on reply previews

This commit is contained in:
Henry Hiles 2026-11-05 23:14:30 -05:00
commit 4061b7b51e
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -100,7 +100,14 @@ class const MessageRenderer(
) => Column( ) => Column(
crossAxisAlignment: .start, crossAxisAlignment: .start,
children: [ children: [
format == .html && formattedBody != null && !textOnly textOnly
? Text(
body.isEmpty ? content.filename ?? "" : body,
style: textStyle,
maxLines: maxLines,
overflow: maxLines == null ? null : .ellipsis,
)
: format == .html && formattedBody != null
? Html( ? Html(
roomId: event.roomId, roomId: event.roomId,
textStyle: textStyle, textStyle: textStyle,
@ -250,7 +257,10 @@ class const MessageRenderer(
child: Padding( child: Padding(
padding: .symmetric(vertical: 8, horizontal: 12), padding: .symmetric(vertical: 8, horizontal: 12),
child: SizedBox( child: SizedBox(
height: 48, // Two lines of text, plus EventPreview's padding
height:
MediaQuery.textScalerOf(context).scale(40) +
8,
child: switch (ref.watch( child: switch (ref.watch(
EventController.provider( EventController.provider(
.new( .new(