From aed5d962e5ab739bb3946034ff023ebad3ac19da Mon Sep 17 00:00:00 2001 From: ashilkn Date: Thu, 28 Nov 2024 14:16:59 +0530 Subject: [PATCH] [mob][photos] Fix bug when clicking on 'collect' in shared tab to collect photos --- mobile/lib/utils/collection_util.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mobile/lib/utils/collection_util.dart b/mobile/lib/utils/collection_util.dart index 897bde6ca4..5f30e4322f 100644 --- a/mobile/lib/utils/collection_util.dart +++ b/mobile/lib/utils/collection_util.dart @@ -22,6 +22,7 @@ Future onTapCollectEventPhotos(BuildContext context) async { alwaysShowSuccessState: false, initialValue: currentDate, textCapitalization: TextCapitalization.words, + popnavAfterSubmission: false, onSubmit: (String text) async { // indicates user cancelled the rename request if (text.trim() == "") { @@ -31,14 +32,14 @@ Future onTapCollectEventPhotos(BuildContext context) async { try { final Collection c = await CollectionsService.instance.createAlbum(text); - // ignore: unawaited_futures - routeToPage( + await routeToPage( context, CollectionPage( isFromCollectPhotos: true, CollectionWithThumbnail(c, null), ), ); + Navigator.of(context).pop(); } catch (e, s) { Logger("Collect event photos from CollectPhotosCardWidget") .severe("Failed to rename album", e, s);