mirror of
https://github.com/immich-app/immich.git
synced 2025-05-31 12:15:47 -04:00
fix(mobile): use immutable cache keys for local images (#17794)
This commit is contained in:
parent
0986a71ce3
commit
ee017803bf
@ -106,12 +106,11 @@ class ImmichLocalImageProvider extends ImageProvider<ImmichLocalImageProvider> {
|
|||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
if (identical(this, other)) return true;
|
if (identical(this, other)) return true;
|
||||||
if (other is ImmichLocalImageProvider) {
|
if (other is ImmichLocalImageProvider) {
|
||||||
return asset == other.asset;
|
return asset.id == other.asset.id && asset.localId == other.asset.localId;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode => asset.hashCode;
|
int get hashCode => Object.hash(asset.id, asset.localId);
|
||||||
}
|
}
|
||||||
|
@ -82,11 +82,13 @@ class ImmichLocalThumbnailProvider
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
if (other is! ImmichLocalThumbnailProvider) return false;
|
|
||||||
if (identical(this, other)) return true;
|
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
|
@override
|
||||||
int get hashCode => asset.hashCode;
|
int get hashCode => Object.hash(asset.id, asset.localId);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user