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:
Daimolean 2025-07-02 00:52:11 +08:00 committed by GitHub
parent 639ede78c2
commit 83afd49f5c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 299 additions and 119 deletions

View file

@ -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(),
);
}
}
}