fix: reverse order for subscription display (#2647)
* reverse order for subscription display * generated * removedunneeded update and old BASE_API * generated --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
37e3e9793d
commit
50837194b2
3 changed files with 7 additions and 16 deletions
1
.env
1
.env
|
|
@ -1,4 +1,3 @@
|
|||
BASE_API='https://api.staging.pangea.chat/api/v1'
|
||||
CHOREO_API = 'https://api.staging.pangea.chat'
|
||||
FRONTEND_URL='https://app.staging.pangea.chat'
|
||||
SYNAPSE_URL = 'matrix.staging.pangea.chat'
|
||||
|
|
|
|||
|
|
@ -186,7 +186,6 @@ class SubscriptionController extends BaseController {
|
|||
if (selectedSubscription.isTrial) {
|
||||
try {
|
||||
await activateNewUserTrial();
|
||||
await updateCustomerInfo();
|
||||
} catch (e) {
|
||||
debugPrint("Failed to initialize trial subscription");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,13 +100,16 @@ class ManagementNotAvailableWarning extends StatelessWidget {
|
|||
controller.subscriptionController.currentSubscriptionInfo;
|
||||
|
||||
String getWarningText() {
|
||||
final DateFormat formatter = DateFormat('yyyy-MM-dd');
|
||||
if (controller.currentSubscriptionIsTrial) {
|
||||
return L10n.of(context).trialExpiration(
|
||||
if (controller.currentSubscriptionIsPromotional) {
|
||||
if (currentSubscriptionInfo?.isLifetimeSubscription ?? false) {
|
||||
return L10n.of(context).promotionalSubscriptionDesc;
|
||||
}
|
||||
|
||||
final DateFormat formatter = DateFormat('yyyy-MM-dd');
|
||||
return L10n.of(context).promoSubscriptionExpirationDesc(
|
||||
formatter.format(currentSubscriptionInfo!.expirationDate!),
|
||||
);
|
||||
}
|
||||
|
||||
if (controller.currentSubscriptionAvailable) {
|
||||
String warningText = L10n.of(context).subsciptionPlatformTooltip;
|
||||
if (controller.purchasePlatformDisplayName != null) {
|
||||
|
|
@ -115,16 +118,6 @@ class ManagementNotAvailableWarning extends StatelessWidget {
|
|||
}
|
||||
return warningText;
|
||||
}
|
||||
|
||||
if (controller.currentSubscriptionIsPromotional) {
|
||||
if (currentSubscriptionInfo?.isLifetimeSubscription ?? false) {
|
||||
return L10n.of(context).promotionalSubscriptionDesc;
|
||||
}
|
||||
return L10n.of(context).promoSubscriptionExpirationDesc(
|
||||
formatter.format(currentSubscriptionInfo!.expirationDate!),
|
||||
);
|
||||
}
|
||||
|
||||
return L10n.of(context).subscriptionManagementUnavailable;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue