mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
feat: drift description editor (#20383)
* feat: drift description editor * chore: use focus node * chore: code review fixes * chore: move description update to action.service * refactor * refactor --------- Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
parent
58521c9efb
commit
290e325c5c
6 changed files with 113 additions and 0 deletions
|
|
@ -250,6 +250,22 @@ class ActionNotifier extends Notifier<void> {
|
|||
}
|
||||
}
|
||||
|
||||
Future<ActionResult> updateDescription(ActionSource source, String description) async {
|
||||
final ids = _getRemoteIdsForSource(source);
|
||||
if (ids.length != 1) {
|
||||
_logger.warning('updateDescription called with multiple assets, expected single asset');
|
||||
return ActionResult(count: ids.length, success: false, error: 'Expected single asset for description update');
|
||||
}
|
||||
|
||||
try {
|
||||
final isUpdated = await _service.updateDescription(ids.first, description);
|
||||
return ActionResult(count: 1, success: isUpdated);
|
||||
} catch (error, stack) {
|
||||
_logger.severe('Failed to update description for asset', error, stack);
|
||||
return ActionResult(count: 1, success: false, error: error.toString());
|
||||
}
|
||||
}
|
||||
|
||||
Future<ActionResult> stack(String userId, ActionSource source) async {
|
||||
final ids = _getOwnedRemoteIdsForSource(source);
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue