Skip to content

Commit b251ba4

Browse files
committed
bugfix: fix redownload attachment feature
1 parent 936193c commit b251ba4

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/app/layouts/conversation_attachments/widgets/attachment_popup.dart

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -516,11 +516,9 @@ class _AttachmentPopupState extends OptimizedState<AttachmentPopup> with SingleT
516516
popDetails();
517517
getActiveMwc(message.guid!)?.updateWidgets<EmbeddedMedia>(null);
518518
} else {
519-
// for (Attachment? element in part.attachments) {
520-
// // We might actually need the cvController for this if we're going to manipulate imageData
521-
// // widget.cvController.imageData.remove(element!.guid!);
522-
// // as.redownloadAttachment(element);
523-
// }
519+
MessageWidgetController? mwc = getActiveMwc(message.guid!);
520+
mwc!.cvController?.imageData.remove(attachment!.guid!);
521+
as.redownloadAttachment(attachment!);
524522
popDetails();
525523
getActiveMwc(message.guid!)?.updateWidgets<AttachmentHolder>(null);
526524
}

0 commit comments

Comments
 (0)