Fix cach keys

This commit is contained in:
Vishnu Mohandas
2020-06-06 17:37:24 +05:30
parent d6f34d00c2
commit 90a2a44aec
2 changed files with 3 additions and 3 deletions

View File

@@ -7,10 +7,10 @@ class ImageLruCache {
static LRUMap<int, File> _map = LRUMap(500);
static File get(Photo photo) {
return _map.get(photo.generatedId);
return _map.get(photo.hashCode);
}
static void put(Photo photo, File imageData) {
_map.put(photo.generatedId, imageData);
_map.put(photo.hashCode, imageData);
}
}

View File

@@ -26,7 +26,7 @@ class _ThumbnailCacheKey {
identical(this, other) ||
other is _ThumbnailCacheKey &&
runtimeType == other.runtimeType &&
photo.generatedId == other.photo.generatedId &&
photo.hashCode == other.photo.hashCode &&
size == other.size;
@override