From d2c14372109a8529583c280395784afe7b508897 Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Mon, 14 Jul 2025 16:33:02 +0530 Subject: [PATCH 1/2] Make dialog dismissible --- .../apps/photos/lib/ui/payment/store_subscription_page.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mobile/apps/photos/lib/ui/payment/store_subscription_page.dart b/mobile/apps/photos/lib/ui/payment/store_subscription_page.dart index b83b65b5d2..6b27a57d24 100644 --- a/mobile/apps/photos/lib/ui/payment/store_subscription_page.dart +++ b/mobile/apps/photos/lib/ui/payment/store_subscription_page.dart @@ -161,7 +161,11 @@ class _StoreSubscriptionPageState extends State { _isLoading = true; _fetchSubData(); } - _dialog = createProgressDialog(context, S.of(context).pleaseWait); + _dialog = createProgressDialog( + context, + S.of(context).pleaseWait, + isDismissible: true, + ); return Scaffold( appBar: AppBar(), body: Column( From aa60c3c71a90a2d9541a82e9200867c97857d6cf Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Mon, 14 Jul 2025 16:35:33 +0530 Subject: [PATCH 2/2] Log error during sub fetch --- .../lib/ui/payment/store_subscription_page.dart | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/mobile/apps/photos/lib/ui/payment/store_subscription_page.dart b/mobile/apps/photos/lib/ui/payment/store_subscription_page.dart index 6b27a57d24..c25ab461b9 100644 --- a/mobile/apps/photos/lib/ui/payment/store_subscription_page.dart +++ b/mobile/apps/photos/lib/ui/payment/store_subscription_page.dart @@ -204,8 +204,9 @@ class _StoreSubscriptionPageState extends State { } Future _fetchSubData() async { - // ignore: unawaited_futures - _userService.getUserDetailsV2(memoryCount: false).then((userDetails) async { + try { + final userDetails = + await _userService.getUserDetailsV2(memoryCount: false); _userDetails = userDetails; _currentSubscription = userDetails.subscription; @@ -236,7 +237,14 @@ class _StoreSubscriptionPageState extends State { if (mounted) { setState(() {}); } - }); + } catch (e, s) { + _logger.severe("Error fetching subscription data", e, s); + if (mounted) { + setState(() { + _isLoading = false; + }); + } + } } Widget _getBody() {