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:
Timon
2026-02-22 06:53:39 +01:00
committed by GitHub
parent f0e2fced57
commit 3ce0654cab
6 changed files with 221 additions and 1 deletions

View File

@@ -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) {