diff --git a/lib/models/messages/filemessage.dart b/lib/models/messages/filemessage.dart index c425ae0b..fe4ff9ab 100644 --- a/lib/models/messages/filemessage.dart +++ b/lib/models/messages/filemessage.dart @@ -33,11 +33,11 @@ class FileMessage extends Message { int fileSize = shareObj['s'] as int; String fileKey = rootHash + "." + nonce; - // if (metadata.attributes["file-downloaded"] == "true") { - // if (!Provider.of(context).downloadKnown(fileKey)) { - Provider.of(context, listen: false).cwtch.CheckDownloadStatus(Provider.of(context, listen: false).onion, fileKey); - // } - //} + if (metadata.attributes["file-downloaded"] != "true") { + if (!Provider.of(context,listen: false).downloadKnown(fileKey)) { + Provider.of(context, listen: false).cwtch.CheckDownloadStatus(Provider.of(context, listen: false).onion, fileKey); + } + } if (!validHash(rootHash, nonce)) { return MessageRow(MalformedBubble(), index);