fix: fix overlay reactions bouncing around (#5031)

This commit is contained in:
ggurdin 2026-01-02 11:01:01 -05:00 committed by GitHub
parent 3cd387cc13
commit a6b522529d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 14 deletions

View file

@ -20,11 +20,13 @@ class PangeaMessageReactions extends StatefulWidget {
final Event event;
final Timeline timeline;
final ChatController controller;
final double? maxWidth;
const PangeaMessageReactions(
this.event,
this.timeline,
this.controller, {
this.maxWidth,
super.key,
});
@ -120,13 +122,12 @@ class _PangeaMessageReactionsState extends State<PangeaMessageReactions> {
.aggregatedEvents(widget.timeline, RelationshipTypes.reaction)
.toList();
return Directionality(
textDirection: ownMessage ? TextDirection.rtl : TextDirection.ltr,
child: AnimatedSize(
duration: FluffyThemes.animationDuration,
curve: FluffyThemes.animationCurve,
alignment: ownMessage ? Alignment.bottomRight : Alignment.bottomLeft,
clipBehavior: Clip.none,
return SizedBox(
width: allReactionEvents.any((e) => e.status.isSending)
? null
: widget.maxWidth,
child: Directionality(
textDirection: ownMessage ? TextDirection.rtl : TextDirection.ltr,
child: Wrap(
crossAxisAlignment: WrapCrossAlignment.center,
runSpacing: 4.0,

View file

@ -96,13 +96,11 @@ class OverlayCenterContent extends StatelessWidget {
top: 4.0,
left: ownMessage ? 0.0 : 4.0,
),
child: ConstrainedBox(
constraints: BoxConstraints(maxWidth: reactionsWidth ?? 0.0),
child: PangeaMessageReactions(
event,
chatController.timeline!,
chatController,
),
child: PangeaMessageReactions(
event,
chatController.timeline!,
chatController,
maxWidth: reactionsWidth ?? 0.0,
),
),
],