From 06e5b4baae828fefd95bbf9d12c870be738325b9 Mon Sep 17 00:00:00 2001 From: merefield Date: Mon, 9 Oct 2023 14:02:07 +0100 Subject: [PATCH] try alternative subscription update --- .../components/wizard-subscription-badge.js | 37 ++++++++++--------- .../components/wizard-subscription-status.js | 1 - 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/assets/javascripts/discourse/components/wizard-subscription-badge.js b/assets/javascripts/discourse/components/wizard-subscription-badge.js index 910e9cb3..2146e869 100644 --- a/assets/javascripts/discourse/components/wizard-subscription-badge.js +++ b/assets/javascripts/discourse/components/wizard-subscription-badge.js @@ -39,23 +39,24 @@ export default class WizardSubscriptionBadge extends Component { @action update() { - this.updating = true; - return ajax(`${this.basePath}/subscriptions`, { - type: "POST", - }) - .then(() => { - if (this.subscription.subscribed) { - this.updateIcon = "check"; - } else { - this.updateIcon = "times"; - } - }) - .catch(popupAjaxError) - .finally(() => { - this.updating = false; - // setTimeout(() => { - // this.updateIcon = null; - // }, 7000); - }); + this.subscription.retrieveSubscriptionStatus(); + // this.updating = true; + // return ajax(`${this.basePath}/subscriptions`, { + // type: "POST", + // }) + // .then(() => { + // if (this.subscription.subscribed) { + // this.updateIcon = "check"; + // } else { + // this.updateIcon = "times"; + // } + // }) + // .catch(popupAjaxError) + // .finally(() => { + // this.updating = false; + // setTimeout(() => { + // this.updateIcon = null; + // }, 7000); + // }); } } diff --git a/assets/javascripts/discourse/components/wizard-subscription-status.js b/assets/javascripts/discourse/components/wizard-subscription-status.js index 43c2cd9b..e8efc49c 100644 --- a/assets/javascripts/discourse/components/wizard-subscription-status.js +++ b/assets/javascripts/discourse/components/wizard-subscription-status.js @@ -47,7 +47,6 @@ export default class WizardSubscriptionStatus extends Component { .finally(() => { this.unauthorizing = false; this.subscription.retrieveSubscriptionStatus(); - //window.location.reload(); }) .catch(popupAjaxError); }