mirror of
https://github.com/immich-app/immich.git
synced 2026-02-28 17:49:05 +03:00
feat(mobile): Allow users to set album cover from mobile app (#25515)
* set album cover from asset
* add to correct kebab group
* add to album selection
* add to legacy control bottom bar
* add tests
* format
* analyze
* Revert "add to legacy control bottom bar"
This reverts commit 9d68e12a08.
* remove unnecessary event emission
* lint
* fix tests
* fix: button order and remove unncessary check
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
@@ -240,6 +240,12 @@ class ActionService {
|
||||
return _downloadRepository.downloadAllAssets(assets);
|
||||
}
|
||||
|
||||
Future<bool> setAlbumCover(String albumId, String assetId) async {
|
||||
final updatedAlbum = await _albumApiRepository.updateAlbum(albumId, thumbnailAssetId: assetId);
|
||||
await _remoteAlbumRepository.update(updatedAlbum);
|
||||
return true;
|
||||
}
|
||||
|
||||
Future<int> _deleteLocalAssets(List<String> localIds) async {
|
||||
final deletedIds = await _assetMediaRepository.deleteAll(localIds);
|
||||
if (deletedIds.isEmpty) {
|
||||
|
||||
Reference in New Issue
Block a user