mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
feat(mobile): edit location action (#19645)
* change dto from integer to double * feat(mobile): edit location action * patch openapi * refactor in provider * fix lint * chore: not showing success prompt if dimissed * i18n --------- Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
parent
639ede78c2
commit
83afd49f5c
18 changed files with 299 additions and 119 deletions
|
|
@ -172,4 +172,26 @@ class ActionNotifier extends Notifier<void> {
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
Future<ActionResult?> editLocation(
|
||||
ActionSource source,
|
||||
BuildContext context,
|
||||
) async {
|
||||
final ids = _getIdsForSource<RemoteAsset>(source);
|
||||
try {
|
||||
final isEdited = await _service.editLocation(ids, context);
|
||||
if (!isEdited) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return ActionResult(count: ids.length, success: true);
|
||||
} catch (error, stack) {
|
||||
_logger.severe('Failed to edit location for assets', error, stack);
|
||||
return ActionResult(
|
||||
count: ids.length,
|
||||
success: false,
|
||||
error: error.toString(),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue