High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
fix(mobile): use immutable cache keys for local images (#17794)
Łukasz Wawrzykee017803bf3b
diff --git a/mobile/lib/providers/image/immich_local_image_provider.dart b/mobile/lib/providers/image/immich_local_image_provider.dartindex 36fd3334b9..c152934333 100644--- a/mobile/lib/providers/image/immich_local_image_provider.dart+++ b/mobile/lib/providers/image/immich_local_image_provider.dart@@ -106,12 +106,11 @@ class ImmichLocalImageProvider extends ImageProvider<ImmichLocalImageProvider> {bool operator ==(Object other) {if (identical(this, other)) return true;if (other is ImmichLocalImageProvider) {- return asset == other.asset;+ return asset.id == other.asset.id && asset.localId == other.asset.localId;}-return false;}@override- int get hashCode => asset.hashCode;+ int get hashCode => Object.hash(asset.id, asset.localId);}diff --git a/mobile/lib/providers/image/immich_local_thumbnail_provider.dart b/mobile/lib/providers/image/immich_local_thumbnail_provider.dartindex 69cdb105c0..54dfd97983 100644--- a/mobile/lib/providers/image/immich_local_thumbnail_provider.dart+++ b/mobile/lib/providers/image/immich_local_thumbnail_provider.dart@@ -82,11 +82,13 @@ class ImmichLocalThumbnailProvider@overridebool operator ==(Object other) {- if (other is! ImmichLocalThumbnailProvider) return false;if (identical(this, other)) return true;- return asset == other.asset;+ if (other is ImmichLocalThumbnailProvider) {+ return asset.id == other.asset.id && asset.localId == other.asset.localId;+ }+ return false;}@override- int get hashCode => asset.hashCode;+ int get hashCode => Object.hash(asset.id, asset.localId);}