mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
feat: manually upload local assets to album
This commit is contained in:
@@ -81,10 +81,15 @@ class RemoteAsset extends BaseAsset {
|
|||||||
stackId == other.stackId;
|
stackId == other.stackId;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mirrors `==` above, which deliberately does not compare localId.
|
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
super.hashCode ^ id.hashCode ^ ownerId.hashCode ^ thumbHash.hashCode ^ visibility.hashCode ^ stackId.hashCode;
|
super.hashCode ^
|
||||||
|
id.hashCode ^
|
||||||
|
ownerId.hashCode ^
|
||||||
|
localId.hashCode ^
|
||||||
|
thumbHash.hashCode ^
|
||||||
|
visibility.hashCode ^
|
||||||
|
stackId.hashCode;
|
||||||
|
|
||||||
RemoteAsset copyWith({
|
RemoteAsset copyWith({
|
||||||
String? id,
|
String? id,
|
||||||
|
|||||||
@@ -234,7 +234,11 @@ class _AssetTileWidget extends ConsumerWidget {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return lockSelectionAssets.contains(asset);
|
// Iterate with `==` instead of `Set.contains` because `RemoteAsset.hashCode`
|
||||||
|
// includes `localId` while `==` does not — so the same server asset can
|
||||||
|
// hash to a different bucket when its `localId` differs (e.g., album-fetched
|
||||||
|
// copy has localId=null, merged-timeline copy has it populated).
|
||||||
|
return lockSelectionAssets.any((a) => a == asset);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
Reference in New Issue
Block a user