From 42008b5863f781993810c49f534c1eec06714185 Mon Sep 17 00:00:00 2001 From: sherlock Date: Mon, 13 Nov 2023 17:13:18 +0700 Subject: [PATCH] TW-952: copy text for replied messages --- lib/pages/chat/chat.dart | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/pages/chat/chat.dart b/lib/pages/chat/chat.dart index d9773df9db..fe02375c5a 100644 --- a/lib/pages/chat/chat.dart +++ b/lib/pages/chat/chat.dart @@ -793,7 +793,10 @@ class ChatController extends State if (selectedEvents.length == 1) { return selectedEvents.first .getDisplayEvent(timeline!) - .calcLocalizedBodyFallback(MatrixLocals(L10n.of(context)!)); + .calcLocalizedBodyFallback( + MatrixLocals(L10n.of(context)!), + hideReply: true, + ); } for (final event in selectedEvents) { if (copyString.isNotEmpty) copyString += '\n\n'; @@ -837,8 +840,8 @@ class ChatController extends State } } - void copyEventsAction() { - Clipboard.instance.copyText(_getSelectedEventString()); + void copyEventsAction({String? copiedText}) async { + await Clipboard.instance.copyText(copiedText ?? _getSelectedEventString()); showEmojiPickerNotifier.value = false; setState(() {