3431 accommodate wrapped reactions in message selection overlay (#3553)

* chore: accomodate wrapped emoji highlight in message overlay

* fix reaction alignment relative to message in overlay
This commit is contained in:
ggurdin 2025-07-24 10:07:56 -04:00 committed by GitHub
parent 1318629997
commit 8c16e50d5c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 29 additions and 3 deletions

View file

@ -992,7 +992,18 @@ class Message extends StatelessWidget {
left: (ownMessage ? 0 : Avatar.defaultSize) + 12.0,
right: ownMessage ? 0 : 12.0,
),
child: MessageReactions(event, timeline),
// #Pangea
// child: MessageReactions(event, timeline),
child: MessageReactions(
event,
timeline,
key: MatrixState.pAnyState
.layerLinkAndKey(
'message_reactions_${event.eventId}',
)
.key,
),
// Pangea#
),
),
if (displayReadMarker)

View file

@ -151,7 +151,12 @@ class MessageSelectionPositionerState extends State<MessageSelectionPositioner>
return reactionsEvents.where((e) => !e.redacted).isNotEmpty;
}
double get reactionsHeight => hasReactions ? 28.0 : 0.0;
double get reactionsHeight {
if (_reactionsRenderBox != null) {
return _reactionsRenderBox!.size.height + 4.0;
}
return hasReactions ? 28.0 : 0.0;
}
bool get ownMessage =>
widget.event.senderId == widget.event.room.client.userID;
@ -202,6 +207,14 @@ class MessageSelectionPositionerState extends State<MessageSelectionPositioner>
null,
);
RenderBox? get _reactionsRenderBox => _runWithLogging<RenderBox?>(
() => MatrixState.pAnyState.getRenderBox(
'message_reactions_${widget.event.eventId}',
),
"Error getting reactions render box",
null,
);
Size? get _overlayMessageSize => _overlayMessageRenderBox?.size;
Offset? get overlayMessageOffset {

View file

@ -55,7 +55,9 @@ class OverlayCenterContent extends StatelessWidget {
ignoring: !isTransitionAnimation &&
readingAssistanceMode != ReadingAssistanceMode.practiceMode,
child: Container(
constraints: BoxConstraints(maxWidth: overlayController.maxWidth),
constraints: const BoxConstraints(
maxWidth: FluffyThemes.maxTimelineWidth,
),
child: Material(
type: MaterialType.transparency,
child: Column(