Fix cach keys
This commit is contained in:
4
lib/core/cache/image_cache.dart
vendored
4
lib/core/cache/image_cache.dart
vendored
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
2
lib/core/cache/thumbnail_cache.dart
vendored
2
lib/core/cache/thumbnail_cache.dart
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user