This commit is contained in:
Alex
2026-04-27 22:10:55 -05:00
parent f24c83465f
commit 596042c3c4
2 changed files with 7 additions and 4 deletions

View File

@@ -183,8 +183,10 @@ class RemoteAlbumService {
return album.added.length;
}
/// Adds an asset selection to an album, uploading any local-only assets
/// first and linking each one as soon as its upload completes.
/// !TODO The name here is not clear as we have addAssets method above,
/// which is only add remote assets to album, for the next PR, we will allow
/// adding local assets from album from the timeline as well with this flow.
/// So saving that for the next refactor
Future<int> addAssetsToAlbum({
required String albumId,
required UserDto uploader,

View File

@@ -39,7 +39,8 @@ class _RemoteAlbumPageState extends ConsumerState<RemoteAlbumPage> {
}
Future<void> addAssets(BuildContext context) async {
final albumAssets = await ref.read(remoteAlbumProvider.notifier).getAssets(_album.id);
final notifier = ref.read(remoteAlbumProvider.notifier);
final albumAssets = await notifier.getAssets(_album.id);
final newAssets = await context.pushRoute<Set<BaseAsset>>(
DriftAssetSelectionTimelineRoute(lockedSelectionAssets: albumAssets.toSet()),
@@ -49,7 +50,7 @@ class _RemoteAlbumPageState extends ConsumerState<RemoteAlbumPage> {
return;
}
final added = await ref.read(remoteAlbumProvider.notifier).addAssetsToAlbum(_album.id, newAssets);
final added = await notifier.addAssetsToAlbum(_album.id, newAssets);
if (added > 0 && context.mounted) {
ImmichToast.show(