Fix Performance Issues related to File Bubble / Downloading

This commit is contained in:
Sarah Jamie Lewis 2023-04-17 10:36:45 -07:00
parent 150d1c27b4
commit 5418bb00d8
1 changed files with 5 additions and 5 deletions

View File

@ -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<ProfileInfoState>(context).downloadKnown(fileKey)) {
Provider.of<FlwtchState>(context, listen: false).cwtch.CheckDownloadStatus(Provider.of<ProfileInfoState>(context, listen: false).onion, fileKey);
// }
//}
if (metadata.attributes["file-downloaded"] != "true") {
if (!Provider.of<ProfileInfoState>(context,listen: false).downloadKnown(fileKey)) {
Provider.of<FlwtchState>(context, listen: false).cwtch.CheckDownloadStatus(Provider.of<ProfileInfoState>(context, listen: false).onion, fileKey);
}
}
if (!validHash(rootHash, nonce)) {
return MessageRow(MalformedBubble(), index);