Skip to content

2.7.9#385

Merged
ianrumac merged 2 commits intomainfrom
develop
Mar 20, 2026
Merged

2.7.9#385
ianrumac merged 2 commits intomainfrom
develop

Conversation

@ianrumac
Copy link
Collaborator

@ianrumac ianrumac commented Mar 20, 2026

2.7.9

Fixes

  • Fix review dialog closing paywall

Checklist

  • All unit tests pass.
  • All UI tests pass.
  • Demo project builds and runs.
  • I added/updated tests or detailed why my change isn't tested.
  • I added an entry to the CHANGELOG.md for any breaking changes, enhancements, or bug fixes.
  • I have run ktlint in the main directory and fixed any issues.
  • I have updated the SDK documentation as well as the online docs.
  • I have reviewed the contributing guide

Greptile Summary

This PR releases version 2.7.9 and fixes a bug where the paywall was being unconditionally dismissed (with Declined / SystemLogic) immediately after handling a RequestReview paywall web event — preventing the in-app review dialog from being seen by the user before the paywall disappeared.

Key changes:

  • Superwall.kt: Removes the dismiss(paywallView, Declined(), SystemLogic) call that followed the RequestReview when block, so the paywall now remains open after launching the review flow.
  • CHANGELOG.md: Adds a 2.7.9 entry, though the fix description ("Fix review dialog not showing") does not precisely match the actual change ("Fix review dialog closing paywall"). The description should be updated for accuracy.
  • version.env: Version bumped from 2.7.8 to 2.7.9.

Confidence Score: 4/5

  • This PR is safe to merge — it is a minimal, targeted fix that removes an erroneous dismiss call with no other side-effects beyond the intended behaviour change.
  • The code change is small (5 lines removed) and clearly fixes a genuine bug. The only concerns are: (1) the CHANGELOG description is inaccurate, and (2) the else branch (Play Store URL) is also implicitly affected — the paywall will no longer be dismissed after opening the Play Store URL either. Both are low-risk, but worth explicit confirmation.
  • superwall/src/main/java/com/superwall/sdk/Superwall.kt — verify the else branch (Play Store URL) behaviour is intentionally changed as well.

Important Files Changed

Filename Overview
superwall/src/main/java/com/superwall/sdk/Superwall.kt Removes a dismiss(paywallView, Declined(), SystemLogic) call that ran unconditionally after every RequestReview paywall event (both in-app review and Play Store URL branches). Fix is correct for the in-app review case; the side-effect on the Play Store URL (else) branch should be explicitly verified.
CHANGELOG.md Version 2.7.9 entry added, but the fix description ("Fix review dialog not showing") does not match the PR description ("Fix review dialog closing paywall") or the actual code change.
version.env Version bumped from 2.7.8 to 2.7.9 — straightforward and consistent with CHANGELOG and PR title.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[PaywallWebEvent.RequestReview received] --> B{paywallEvent.type}

    B -- INAPP --> C[requestReviewFlow]
    C --> D{activity != null?}
    D -- Yes --> E[launchReviewFlow]
    E --> F[Increment review count & track ReviewRequested]
    D -- No --> G[Skip review launch]

    B -- else --> H[Build Play Store URL]
    H --> I[startActivity with Play Store URL]

    F --> J_new[✅ Paywall stays open]
    G --> J_new
    I --> J_new

    style J_new fill:#c8f7c5,stroke:#27ae60

    subgraph BEFORE ["Before fix (removed code)"]
        K["dismiss(paywallView, Declined(), SystemLogic)"]
        L[❌ Paywall dismissed]
        K --> L
    end
Loading

Comments Outside Diff (1)

  1. superwall/src/main/java/com/superwall/sdk/Superwall.kt, line 1406-1416 (link)

    P2 else (Play Store URL) branch also affected by this fix

    The removed dismiss() call was located after the entire when block, meaning it previously executed for both branches:

    1. INAPP — launches the in-app review dialog, then dismissed the paywall.
    2. else — opens the Play Store URL (https://play.google.com/store/apps/details?id=...), then dismissed the paywall.

    With this change, the paywall is no longer dismissed in the else (Play Store URL) branch either. This is probably fine—leaving the paywall open after the user returns from the Play Store URL is more consistent—but it is an implicit behavioural change that isn't mentioned in the PR or CHANGELOG. Please confirm this is the intended outcome for the else branch as well.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: superwall/src/main/java/com/superwall/sdk/Superwall.kt
    Line: 1406-1416
    
    Comment:
    **`else` (Play Store URL) branch also affected by this fix**
    
    The removed `dismiss()` call was located *after* the entire `when` block, meaning it previously executed for **both** branches:
    
    1. `INAPP` — launches the in-app review dialog, then dismissed the paywall.
    2. `else` — opens the Play Store URL (`https://play.google.com/store/apps/details?id=...`), then dismissed the paywall.
    
    With this change, the paywall is no longer dismissed in the `else` (Play Store URL) branch either. This is probably fine—leaving the paywall open after the user returns from the Play Store URL is more consistent—but it is an implicit behavioural change that isn't mentioned in the PR or CHANGELOG. Please confirm this is the intended outcome for the `else` branch as well.
    
    How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
This is a comment left during a code review.
Path: CHANGELOG.md
Line: 8

Comment:
**Changelog description doesn't match PR description**

The CHANGELOG entry says `"Fix review dialog not showing"`, but the PR description says `"Fix review dialog closing paywall"`. These describe different issues. The actual code change removes a `dismiss()` call that fired unconditionally after the review-flow/Play-Store branch, so the paywall was being closed even though the review dialog was shown. The root cause is "paywall dismissed after review dialog launch", not "review dialog not showing".

Please align the changelog entry with the real change to avoid confusion for consumers of the changelog.

```suggestion
- Fix review dialog closing paywall
```

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: superwall/src/main/java/com/superwall/sdk/Superwall.kt
Line: 1406-1416

Comment:
**`else` (Play Store URL) branch also affected by this fix**

The removed `dismiss()` call was located *after* the entire `when` block, meaning it previously executed for **both** branches:

1. `INAPP` — launches the in-app review dialog, then dismissed the paywall.
2. `else` — opens the Play Store URL (`https://play.google.com/store/apps/details?id=...`), then dismissed the paywall.

With this change, the paywall is no longer dismissed in the `else` (Play Store URL) branch either. This is probably fine—leaving the paywall open after the user returns from the Play Store URL is more consistent—but it is an implicit behavioural change that isn't mentioned in the PR or CHANGELOG. Please confirm this is the intended outcome for the `else` branch as well.

How can I resolve this? If you propose a fix, please make it concise.

Last reviewed commit: "Bump version, fix bu..."

Greptile also left 1 inline comment on this PR.

@ianrumac ianrumac merged commit 841479d into main Mar 20, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant