From cf499482df741bf37179441035813783b8b3c8fd Mon Sep 17 00:00:00 2001 From: Ryan Miller Date: Fri, 21 Nov 2025 16:15:36 +1100 Subject: [PATCH 1/2] fix: cleanup pro expiry ctas when pro resets --- ts/state/ducks/proBackendData.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ts/state/ducks/proBackendData.ts b/ts/state/ducks/proBackendData.ts index ede5accff..05fb30d6f 100644 --- a/ts/state/ducks/proBackendData.ts +++ b/ts/state/ducks/proBackendData.ts @@ -212,6 +212,11 @@ async function handleExpiryCTAs( const proExpiringSoonCTA = !isUndefined(Storage.get(SettingsKey.proExpiringSoonCTA)); const proExpiredCTA = !isUndefined(Storage.get(SettingsKey.proExpiredCTA)); + // Remove the pro expired cta item if the user gets pro again + if (status === ProStatus.Active && proExpiredCTA) { + await Storage.remove(SettingsKey.proExpiredCTA); + } + if (now < sevenDaysBeforeExpiry) { // More than 7 days before expiry, remove CTA items if they exist. This means the items were set for a previous cycle of pro access. if (proExpiringSoonCTA) { @@ -229,6 +234,10 @@ async function handleExpiryCTAs( // Between expiry and 30 days after expiry, Expired CTA needs to be marked to be shown if not already if (status === ProStatus.Expired && !proExpiredCTA) { await Storage.put(SettingsKey.proExpiredCTA, true); + // The expiring soon CTA should be removed if its set as we want to show it again in the future if needed + if (proExpiringSoonCTA) { + await Storage.remove(SettingsKey.proExpiringSoonCTA); + } } } } From 5d1abb0c50fb3fd4058b065c21a558fbd2559e28 Mon Sep 17 00:00:00 2001 From: Ryan Miller Date: Fri, 21 Nov 2025 16:26:44 +1100 Subject: [PATCH 2/2] chore: cleanup comment typo --- ts/state/ducks/proBackendData.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/state/ducks/proBackendData.ts b/ts/state/ducks/proBackendData.ts index 05fb30d6f..6e5c38de9 100644 --- a/ts/state/ducks/proBackendData.ts +++ b/ts/state/ducks/proBackendData.ts @@ -234,7 +234,7 @@ async function handleExpiryCTAs( // Between expiry and 30 days after expiry, Expired CTA needs to be marked to be shown if not already if (status === ProStatus.Expired && !proExpiredCTA) { await Storage.put(SettingsKey.proExpiredCTA, true); - // The expiring soon CTA should be removed if its set as we want to show it again in the future if needed + // The expiring soon CTA should be removed if it's set as we want to show it again in the future if needed if (proExpiringSoonCTA) { await Storage.remove(SettingsKey.proExpiringSoonCTA); }