You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-08-08 23:07:06 +02: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:
@ -101,4 +101,3 @@ lib/model/user_count_response_dto.dart
|
||||
lib/model/user_response_dto.dart
|
||||
lib/model/validate_access_token_response_dto.dart
|
||||
pubspec.yaml
|
||||
test/logout_response_dto_test.dart
|
||||
|
@ -306,7 +306,7 @@ Name | Type | Description | Notes
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **removeAssetFromAlbum**
|
||||
> removeAssetFromAlbum(albumId, removeAssetsDto)
|
||||
> AlbumResponseDto removeAssetFromAlbum(albumId, removeAssetsDto)
|
||||
|
||||
|
||||
|
||||
@ -325,7 +325,8 @@ final albumId = albumId_example; // String |
|
||||
final removeAssetsDto = RemoveAssetsDto(); // RemoveAssetsDto |
|
||||
|
||||
try {
|
||||
api_instance.removeAssetFromAlbum(albumId, removeAssetsDto);
|
||||
final result = api_instance.removeAssetFromAlbum(albumId, removeAssetsDto);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling AlbumApi->removeAssetFromAlbum: $e\n');
|
||||
}
|
||||
@ -340,7 +341,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
[**AlbumResponseDto**](AlbumResponseDto.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
@ -349,7 +350,7 @@ void (empty response body)
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -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