fix: Copying an event did not obey edits

This commit is contained in:
Sorunome 2020-11-21 15:30:15 +01:00
parent c4f3829a18
commit 0cb262c39c
No known key found for this signature in database
GPG Key ID: B19471D07FC9BE9C
1 changed files with 3 additions and 1 deletions

View File

@ -301,11 +301,13 @@ class _ChatState extends State<_Chat> {
var copyString = ''; var copyString = '';
if (selectedEvents.length == 1) { if (selectedEvents.length == 1) {
return selectedEvents.first return selectedEvents.first
.getDisplayEvent(timeline)
.getLocalizedBody(MatrixLocals(L10n.of(context))); .getLocalizedBody(MatrixLocals(L10n.of(context)));
} }
for (var event in selectedEvents) { for (var event in selectedEvents) {
if (copyString.isNotEmpty) copyString += '\n\n'; if (copyString.isNotEmpty) copyString += '\n\n';
copyString += event.getLocalizedBody(MatrixLocals(L10n.of(context)), copyString += event.getDisplayEvent(timeline).getLocalizedBody(
MatrixLocals(L10n.of(context)),
withSenderNamePrefix: true); withSenderNamePrefix: true);
} }
return copyString; return copyString;