Skip to content

High performance self-hosted photo and video management solution.

fix(mobile): update album creation to use user-defined name from dialog (#30002)

Luis Nachtigallb5401eb1200a
diff --git a/mobile/lib/presentation/widgets/album/album_selector.widget.dart b/mobile/lib/presentation/widgets/album/album_selector.widget.dart
index 5a174bfc5e..44abfba47e 100644
--- a/mobile/lib/presentation/widgets/album/album_selector.widget.dart
+++ b/mobile/lib/presentation/widgets/album/album_selector.widget.dart
@@ -745,10 +745,15 @@ class AddToAlbumHeader extends ConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
Future<void> onCreateAlbum() async {
+ final albumName = await showDialog<String?>(context: context, builder: (context) => const NewAlbumNameModal());
+ if (albumName == null) {
+ return;
+ }
+
final selectedAssets = ref.read(multiSelectProvider).selectedAssets;
final newAlbum = await ref
.read(remoteAlbumProvider.notifier)
- .createAlbumWithAssets(title: "Untitled Album", assets: selectedAssets);
+ .createAlbumWithAssets(title: albumName, assets: selectedAssets);
if (newAlbum == null) {
ImmichToast.show(context: context, toastType: ToastType.error, msg: 'errors.failed_to_create_album'.tr());