π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
update subscription page
AmanRajSinghMourya21d678e94659
diff --git a/mobile/apps/photos/lib/ui/payment/store_subscription_page.dart b/mobile/apps/photos/lib/ui/payment/store_subscription_page.dartindex 24c2f1ba31..538b76a2b1 100644--- a/mobile/apps/photos/lib/ui/payment/store_subscription_page.dart+++ b/mobile/apps/photos/lib/ui/payment/store_subscription_page.dart@@ -189,22 +189,6 @@ class _StoreSubscriptionPageState extends State<StoreSubscriptionPage> {body: Column(crossAxisAlignment: CrossAxisAlignment.start,children: [- Padding(- padding: const EdgeInsets.symmetric(vertical: 4, horizontal: 16),- child: Column(- crossAxisAlignment: CrossAxisAlignment.start,- children: [- _isFreePlanUser() || !_hasLoadedData- ? const SizedBox.shrink()- : Text(- convertBytesToReadableFormat(- _userDetails.getTotalStorage(),- ),- style: textTheme.smallMuted,- ),- ],- ),- ),Expanded(child: _getBody()),],),diff --git a/mobile/apps/photos/lib/ui/payment/stripe_subscription_page.dart b/mobile/apps/photos/lib/ui/payment/stripe_subscription_page.dartindex 8bb832acc7..d3c93b7137 100644--- a/mobile/apps/photos/lib/ui/payment/stripe_subscription_page.dart+++ b/mobile/apps/photos/lib/ui/payment/stripe_subscription_page.dart@@ -148,22 +148,6 @@ class _StripeSubscriptionPageState extends State<StripeSubscriptionPage> {body: Column(crossAxisAlignment: CrossAxisAlignment.start,children: [- Padding(- padding: const EdgeInsets.symmetric(vertical: 4, horizontal: 16),- child: Column(- crossAxisAlignment: CrossAxisAlignment.start,- children: [- _isFreePlanUser() || !_hasLoadedData- ? const SizedBox.shrink()- : Text(- convertBytesToReadableFormat(- _userDetails.getTotalStorage(),- ),- style: textTheme.smallMuted,- ),- ],- ),- ),Expanded(child: _getBody()),],),@@ -544,11 +528,6 @@ class _StripeSubscriptionPageState extends State<StripeSubscriptionPage> {return planWidgets;}- bool _isFreePlanUser() {- return _currentSubscription != null &&- freeProductID == _currentSubscription!.productID;- }-bool _isPopularPlan(BillingPlan plan) {return popularProductIDs.contains(plan.id);}diff --git a/mobile/apps/photos/lib/ui/payment/subscription_plan_widget.dart b/mobile/apps/photos/lib/ui/payment/subscription_plan_widget.dartindex 148de07122..dbbfb5b74b 100644--- a/mobile/apps/photos/lib/ui/payment/subscription_plan_widget.dart+++ b/mobile/apps/photos/lib/ui/payment/subscription_plan_widget.dart@@ -28,8 +28,13 @@ class SubscriptionPlanWidget extends StatelessWidget {Widget build(BuildContext context) {final colorScheme = getEnteColorScheme(context);final numAndUnit = convertBytesToNumberAndUnit(storage);- final String storageValue = numAndUnit.$1.toString();- final String storageUnit = numAndUnit.$2.toUpperCase();+ int storageValueInUnit = numAndUnit.$1;+ String storageUnit = numAndUnit.$2.toUpperCase();+ if (storageUnit == "TB") {+ storageValueInUnit = storageValueInUnit * 1000;+ storageUnit = "GB";+ }+ final String storageValue = storageValueInUnit.toString();final bool isSelected = isActive;return Padding(