π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[photos] Improve linked subscription support dialog
megaberryc20d4f484032
diff --git a/mobile/apps/photos/lib/l10n/intl_en.arb b/mobile/apps/photos/lib/l10n/intl_en.arbindex 4a2a69f6e8..e8de4c8b79 100644--- a/mobile/apps/photos/lib/l10n/intl_en.arb+++ b/mobile/apps/photos/lib/l10n/intl_en.arb@@ -1038,7 +1038,7 @@"appleId": "Apple ID","playstoreSubscription": "PlayStore subscription","appstoreSubscription": "AppStore subscription",- "subAlreadyLinkedErrMessage": "Your {id} is already linked to another Ente account.\nIf you would like to use your {id} with this account, please contact our support''",+ "subAlreadyLinkedErrMessage": "Your {id} is already linked to another Ente account.\nIf you would like to use your {id} with this account, please contact our support.","visitWebToManage": "Please visit {webUrl} to manage your subscription","@visitWebToManage": {"description": "Shown when a Stripe subscriber needs to manage their subscription on the web.",diff --git a/mobile/apps/photos/lib/ui/payment/store_subscription_page.dart b/mobile/apps/photos/lib/ui/payment/store_subscription_page.dartindex ef0efce24f..d8b655a858 100644--- a/mobile/apps/photos/lib/ui/payment/store_subscription_page.dart+++ b/mobile/apps/photos/lib/ui/payment/store_subscription_page.dart@@ -20,7 +20,10 @@ import "package:photos/theme/colors.dart";import "package:photos/theme/ente_theme.dart";import 'package:photos/ui/common/loading_widget.dart';import 'package:photos/ui/common/progress_dialog.dart';+import 'package:photos/ui/components/buttons/button_widget.dart';import 'package:photos/ui/components/buttons/button_widget_v2.dart';+import 'package:photos/ui/components/dialog_widget.dart';+import 'package:photos/ui/components/models/button_type.dart';import "package:photos/ui/components/menu_item_widget/menu_item_widget_new.dart";import 'package:photos/ui/family/family_plan_page.dart';import 'package:photos/ui/notification/toast.dart';@@ -28,6 +31,7 @@ import 'package:photos/ui/payment/subscription_common_widgets.dart';import 'package:photos/ui/payment/subscription_plan_widget.dart';import "package:photos/ui/payment/view_add_on_widget.dart";import 'package:photos/utils/dialog_util.dart';+import 'package:photos/utils/email_util.dart';import 'package:url_launcher/url_launcher_string.dart';class StoreSubscriptionPage extends StatefulWidget {@@ -130,8 +134,33 @@ class _StoreSubscriptionPageState extends State<StoreSubscriptionPage> {? l10n.googlePlayId: l10n.appleId;final String message = l10n.subAlreadyLinkedErrMessage(id: id);- // ignore: unawaited_futures- showErrorDialog(context, title, message);+ await showDialogWidget(+ context: context,+ title: title,+ body: message,+ buttons: [+ ButtonWidget(+ buttonType: ButtonType.primary,+ labelText: l10n.contactSupport,+ buttonAction: ButtonAction.first,+ isInAlert: true,+ onTap: () async {+ await sendLogs(+ context,+ l10n.contactSupport,+ "[email protected]",+ postShare: () {},+ );+ },+ ),+ ButtonWidget(+ buttonType: ButtonType.secondary,+ labelText: l10n.cancel,+ buttonAction: ButtonAction.cancel,+ isInAlert: true,+ ),+ ],+ );return;} catch (e) {_logger.warning("Could not complete payment ", e);