feat: manually upload local assets to album

This commit is contained in:
Alex
2026-04-27 21:37:29 -05:00
parent 2210730267
commit f24c83465f
2 changed files with 12 additions and 3 deletions
@@ -81,10 +81,15 @@ class RemoteAsset extends BaseAsset {
stackId == other.stackId;
}
// Mirrors `==` above, which deliberately does not compare localId.
@override
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({
String? id,
@@ -234,7 +234,11 @@ class _AssetTileWidget extends ConsumerWidget {
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