Skip to content

Commit

Permalink
Set DownloadedImage ids to blurhash when migrating
Browse files Browse the repository at this point in the history
  • Loading branch information
jmshrv committed Aug 11, 2023
1 parent e86c5d7 commit 73d35c1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/services/downloads_helper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -898,13 +898,16 @@ class DownloadsHelper {
}
}

// Go through each requiredBy and remove duplicates
// Go through each requiredBy and remove duplicates. We also set the image's
// id to the blurhash.
for (final imageEntry in imageMap.entries) {
final image = imageEntry.value;

image.requiredBy = image.requiredBy.toSet().toList();
_downloadsLogger.warning(image.requiredBy);

image.id = imageEntry.key;

imageMap[imageEntry.key] = image;
}

Expand Down

0 comments on commit 73d35c1

Please sign in to comment.