mirror of
https://github.com/immich-app/immich.git
synced 2025-12-20 09:15:35 +03:00
fix(mobile): restore button in asset viewer (#8919)
* fix:(mobile): spell error in top_control_app_bar.dart in function buildAddToAlbumButtom * fix(mobile): add restore button to individual image view of trashed assets * formatting
This commit is contained in:
@@ -30,6 +30,20 @@ class TrashService {
|
||||
}
|
||||
}
|
||||
|
||||
Future<bool> restoreAsset(Asset asset) async {
|
||||
try {
|
||||
if (asset.isRemote) {
|
||||
List<String> remoteId = [asset.remoteId!];
|
||||
|
||||
await _apiService.trashApi.restoreAssets(BulkIdsDto(ids: remoteId));
|
||||
}
|
||||
return true;
|
||||
} catch (error, stack) {
|
||||
_log.severe("Cannot restore assets", error, stack);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> emptyTrash() async {
|
||||
try {
|
||||
await _apiService.trashApi.emptyTrash();
|
||||
|
||||
Reference in New Issue
Block a user