fix(native): retain the selected storefront offer during account checks

This commit is contained in:
Maurice
2026-11-30 22:19:41 +01:00
parent 857ce49962
commit 6c45d16cba
+5 -2
View File
@@ -1009,7 +1009,10 @@ function showPlans(opts: { back?: boolean } = {}): void {
choose.addEventListener('click', async () => {
const plan = selected();
if (!plan || !offerFor(offer, plan, interval).buyable) return;
if (!plan) return;
const selectedInterval = interval;
const price = offerFor(offer, plan, selectedInterval);
if (!price.buyable) return;
void tap(ImpactStyle.Medium);
// A store account with a running subscription buys nothing more: say so before the form.
choose.disabled = true;
@@ -1019,7 +1022,7 @@ function showPlans(opts: { back?: boolean } = {}): void {
showSubscribed();
return;
}
showClaim(plan, interval, offerFor(offer, plan, interval).label);
showClaim(plan, selectedInterval, price.label);
});
const load = async () => {