mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
Remove/Add asset in ablum on web (#371)
* Added interaction to select multiple thumbnail * Fixed stutter transition * Return AlbumResponseDto after removing an asset from album * Render correctly when an array of thumbnail is updated * Fixed wording * Added native dialog for removing users from album * Fixed rendering incorrect profile image on share user select dialog
This commit is contained in:
@@ -346,11 +346,19 @@ class AlbumApi {
|
||||
/// * [String] albumId (required):
|
||||
///
|
||||
/// * [RemoveAssetsDto] removeAssetsDto (required):
|
||||
Future<void> removeAssetFromAlbum(String albumId, RemoveAssetsDto removeAssetsDto,) async {
|
||||
Future<AlbumResponseDto?> removeAssetFromAlbum(String albumId, RemoveAssetsDto removeAssetsDto,) async {
|
||||
final response = await removeAssetFromAlbumWithHttpInfo(albumId, removeAssetsDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AlbumResponseDto',) as AlbumResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'DELETE /album/{albumId}/user/{userId}' operation and returns the [Response].
|
||||
|
||||
Reference in New Issue
Block a user