From 90a2a44aec91e7b5d7ffe51a6c679b2e712da2b2 Mon Sep 17 00:00:00 2001 From: Vishnu Mohandas Date: Sat, 6 Jun 2020 17:37:24 +0530 Subject: [PATCH] Fix cach keys --- lib/core/cache/image_cache.dart | 4 ++-- lib/core/cache/thumbnail_cache.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/core/cache/image_cache.dart b/lib/core/cache/image_cache.dart index 803048f9a1..c6433f6b8d 100644 --- a/lib/core/cache/image_cache.dart +++ b/lib/core/cache/image_cache.dart @@ -7,10 +7,10 @@ class ImageLruCache { static LRUMap _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); } } diff --git a/lib/core/cache/thumbnail_cache.dart b/lib/core/cache/thumbnail_cache.dart index d515da3e9c..9d5cb09d14 100644 --- a/lib/core/cache/thumbnail_cache.dart +++ b/lib/core/cache/thumbnail_cache.dart @@ -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