1
0
mirror of https://github.com/immich-app/immich.git synced 2025-08-08 23:07:06 +02:00

feat: remove from album action button (#19884)

* feat: remove from album action

* feat: remove from album action
This commit is contained in:
Alex
2025-07-11 10:06:53 -05:00
committed by GitHub
parent 1cc5ca14ca
commit 2b07d7ac63
7 changed files with 109 additions and 1 deletions

View File

@ -228,6 +228,24 @@ class ActionNotifier extends Notifier<void> {
);
}
}
Future<ActionResult> removeFromAlbum(
ActionSource source,
String albumId,
) async {
final ids = _getRemoteIdsForSource(source);
try {
final removedCount = await _service.removeFromAlbum(ids, albumId);
return ActionResult(count: removedCount, success: true);
} catch (error, stack) {
_logger.severe('Failed to remove assets from album', error, stack);
return ActionResult(
count: ids.length,
success: false,
error: error.toString(),
);
}
}
}
extension on Iterable<RemoteAsset> {