chore: finish drift locked page (#20013)

* feat: overlay mechanism

* handle merged asset local id extraction

* locked view asset viewer actions

* pr feedback
This commit is contained in:
Alex 2025-07-18 13:16:22 -05:00 committed by GitHub
parent dcfe8d5ade
commit 5d244c6fec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 143 additions and 26 deletions

View file

@ -83,7 +83,10 @@ class ActionService {
);
}
Future<void> moveToLockFolder(List<String> remoteIds) async {
Future<void> moveToLockFolder(
List<String> remoteIds,
List<String> localIds,
) async {
await _assetApiRepository.updateVisibility(
remoteIds,
AssetVisibilityEnum.locked,
@ -92,6 +95,15 @@ class ActionService {
remoteIds,
AssetVisibility.locked,
);
// Ask user if they want to delete local copies
if (localIds.isNotEmpty) {
final deletedIds = await _assetMediaRepository.deleteAll(localIds);
if (deletedIds.isNotEmpty) {
await _localAssetRepository.delete(deletedIds);
}
}
}
Future<void> removeFromLockFolder(List<String> remoteIds) async {