Skip to content

Commit

Permalink
TW-952: copy text for replied messages
Browse files Browse the repository at this point in the history
  • Loading branch information
sherlockvn authored and hoangdat committed Nov 14, 2023
1 parent f28b574 commit 42008b5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/pages/chat/chat.dart
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,10 @@ class ChatController extends State<Chat>
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';
Expand Down Expand Up @@ -837,8 +840,8 @@ class ChatController extends State<Chat>
}
}

void copyEventsAction() {
Clipboard.instance.copyText(_getSelectedEventString());
void copyEventsAction({String? copiedText}) async {
await Clipboard.instance.copyText(copiedText ?? _getSelectedEventString());

showEmojiPickerNotifier.value = false;
setState(() {
Expand Down

0 comments on commit 42008b5

Please sign in to comment.