diff --git a/lib/pages/chat/events/message.dart b/lib/pages/chat/events/message.dart index 471391cc..a0db26a8 100644 --- a/lib/pages/chat/events/message.dart +++ b/lib/pages/chat/events/message.dart @@ -5,7 +5,6 @@ import 'package:matrix/matrix.dart'; import 'package:swipe_to_action/swipe_to_action.dart'; import 'package:fluffychat/config/themes.dart'; -import 'package:fluffychat/pages/chat/events/message_popup_menu_button.dart'; import 'package:fluffychat/utils/date_time_extension.dart'; import 'package:fluffychat/utils/string_color.dart'; import 'package:fluffychat/widgets/avatar.dart'; @@ -463,17 +462,25 @@ class Message extends StatelessWidget { child: Material( color: Theme.of(context) .colorScheme - .surfaceVariant + .tertiaryContainer .withOpacity(0.9), elevation: Theme.of(context).appBarTheme.scrolledUnderElevation ?? 4, borderRadius: BorderRadius.circular(AppConfig.borderRadius), shadowColor: Theme.of(context).appBarTheme.shadowColor, - child: MessagePopupMenuButton( - event: event, - onReply: onSwipe, - onSelect: () => onSelect(event), + child: SizedBox( + width: 32, + height: 32, + child: IconButton( + icon: Icon( + Icons.adaptive.more_outlined, + size: 16, + color: + Theme.of(context).colorScheme.onTertiaryContainer, + ), + onPressed: () => onSelect(event), + ), ), ), ), diff --git a/lib/pages/chat/events/message_popup_menu_button.dart b/lib/pages/chat/events/message_popup_menu_button.dart deleted file mode 100644 index 474c40f4..00000000 --- a/lib/pages/chat/events/message_popup_menu_button.dart +++ /dev/null @@ -1,55 +0,0 @@ -import 'package:flutter/material.dart'; - -import 'package:flutter_gen/gen_l10n/l10n.dart'; -import 'package:matrix/matrix.dart'; - -class MessagePopupMenuButton extends StatelessWidget { - final Event event; - final double height; - final void Function() onReply; - final void Function() onSelect; - - const MessagePopupMenuButton({ - required this.event, - required this.onReply, - required this.onSelect, - this.height = 32, - super.key, - }); - - @override - Widget build(BuildContext context) { - return SizedBox( - width: height, - height: height, - child: PopupMenuButton( - iconSize: height / 2, - icon: const Icon(Icons.expand_more_outlined), - itemBuilder: (context) => [ - PopupMenuItem( - onTap: onSelect, - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - const Icon(Icons.check_circle_outlined), - const SizedBox(width: 16), - Text(L10n.of(context)!.select), - ], - ), - ), - PopupMenuItem( - onTap: onReply, - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - const Icon(Icons.reply_outlined), - const SizedBox(width: 16), - Text(L10n.of(context)!.reply), - ], - ), - ), - ], - ), - ); - } -}