diff --git a/lib/application/donations/donations_bloc.dart b/lib/application/donations/donations_bloc.dart index 261d58104..d0d9f3c87 100644 --- a/lib/application/donations/donations_bloc.dart +++ b/lib/application/donations/donations_bloc.dart @@ -16,7 +16,7 @@ class DonationsBloc extends Bloc { static int maxUserIdLength = 20; //The user id must be something like 12345_xyz - static String appUserIdRegex = '([0-9]{5,10}[_][A-Za-z])'; + static String appUserIdRegex = '([a-zA-Z0-9]{5,20})'; DonationsBloc(this._purchaseService, this._networkService) : super(const DonationsState.loading()); diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index 31ac82922..4ff3a54f6 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -405,15 +405,12 @@ "donateXAmount": "Donate {amount}", "purchase": "Purchase", "restorePurchases": "Restore Purchases", - "uid": "UID", + "userId": "User ID", "paymentSucceed": "Payment succeed. Thank you for your support.", "paymentError": "Payment could not be completed.", - "donationMsgA": "Your UID will be used to make / restore your purchases.", - "purchaseMsgA": "Make sure to add a custom suffix to your UID (e.g: 12345678_suffix).", - "purchaseMsgB": "Make sure to remember the used suffix, you will need it later in case you need to restore your purchases.", - "purchaseMsgC": "The custom suffix is recommended for security reasons.", - "restorePurchaseMsgA": "Type the UID + custom suffix that you previously used.", - "restorePurchaseMsgB": "The restore process will only work if you previously made a purchase.", + "purchaseMsgA": "Please enter a custom user id, use letters and numbers. Do not use passwords, secret codes, pins, etc.", + "purchaseMsgB": "You may need it later in case you need to restore your purchases.", + "restorePurchaseMsgA": "Type the User ID that you previously used.", "restorePurchaseSucceed": "Purchases were successfully restored", "restorePurchaseError": "Purchases could not be restored" } diff --git a/lib/presentation/donations/donations_bottom_sheet.dart b/lib/presentation/donations/donations_bottom_sheet.dart index 65db4c9cc..2ffc6f278 100644 --- a/lib/presentation/donations/donations_bottom_sheet.dart +++ b/lib/presentation/donations/donations_bottom_sheet.dart @@ -74,13 +74,6 @@ class _BodyState extends State<_Body> { onTap: () => setState(() => _selected = e), ), ), - BulletList( - iconSize: 16, - addTooltip: false, - items: [ - s.donationMsgA, - ], - ), CommonButtonBar( children: [ OutlinedButton( @@ -112,13 +105,13 @@ class _BodyState extends State<_Body> { context: context, builder: (_) => TextDialog.create( title: s.purchase, - hintText: s.uid, + hintText: s.userId, maxLength: DonationsBloc.maxUserIdLength, regexPattern: DonationsBloc.appUserIdRegex, child: BulletList( iconSize: 16, addTooltip: false, - items: [s.purchaseMsgA, s.purchaseMsgB, s.purchaseMsgC], + items: [s.purchaseMsgA, s.purchaseMsgB], ), onSave: (val) => context .read() @@ -133,13 +126,13 @@ class _BodyState extends State<_Body> { context: context, builder: (_) => TextDialog.create( title: s.restorePurchases, - hintText: s.uid, + hintText: s.userId, maxLength: DonationsBloc.maxUserIdLength, regexPattern: DonationsBloc.appUserIdRegex, child: BulletList( iconSize: 16, addTooltip: false, - items: [s.restorePurchaseMsgA, s.restorePurchaseMsgB], + items: [s.restorePurchaseMsgA], ), onSave: (val) => context.read().add(DonationsEvent.restorePurchases(userId: val)), ),