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..c25ab461b9 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( @@ -200,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; @@ -232,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() {