[mob][photos] Fix bug when clicking on 'collect' in shared tab to collect photos

This commit is contained in:
ashilkn
2024-11-28 14:16:59 +05:30
parent 67f42d0b31
commit aed5d962e5

View File

@@ -22,6 +22,7 @@ Future<void> 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<void> 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);