reaction placement (#3548)

pull/2245/head
ggurdin 3 months ago committed by GitHub
parent 98dfa09250
commit 891be5efe5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -151,7 +151,7 @@ class MessageSelectionPositionerState extends State<MessageSelectionPositioner>
return reactionsEvents.where((e) => !e.redacted).isNotEmpty;
}
double get reactionsHeight => hasReactions ? 32.0 : 0.0;
double get reactionsHeight => hasReactions ? 28.0 : 0.0;
bool get ownMessage =>
widget.event.senderId == widget.event.room.client.userID;

@ -83,11 +83,6 @@ class OverMessageOverlay extends StatelessWidget {
width: controller.mediaQuery!.size.width -
controller.columnWidth -
(controller.showDetails ? FluffyThemes.columnWidth : 0),
decoration: BoxDecoration(
border: Border.all(
color: Colors.green,
),
),
),
],
),

@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:matrix/matrix.dart';
import 'package:fluffychat/config/themes.dart';
import 'package:fluffychat/pages/chat/chat.dart';
import 'package:fluffychat/pages/chat/events/message_reactions.dart';
import 'package:fluffychat/pangea/toolbar/enums/reading_assistance_mode_enum.dart';
@ -49,6 +50,7 @@ class OverlayCenterContent extends StatelessWidget {
@override
Widget build(BuildContext context) {
final ownMessage = event.senderId == event.room.client.userID;
return IgnorePointer(
ignoring: !isTransitionAnimation &&
readingAssistanceMode != ReadingAssistanceMode.practiceMode,
@ -83,10 +85,16 @@ class OverlayCenterContent extends StatelessWidget {
),
),
if (hasReactions)
Padding(
padding: const EdgeInsets.all(4),
child: SizedBox(
height: 20,
AnimatedSize(
duration: FluffyThemes.animationDuration,
curve: FluffyThemes.animationCurve,
alignment: Alignment.bottomCenter,
child: Padding(
padding: EdgeInsets.only(
top: 4.0,
left: 4.0,
right: ownMessage ? 0 : 12.0,
),
child: MessageReactions(
event,
chatController.timeline!,

Loading…
Cancel
Save