Skip to content

Stop showing the donation CTA automatically - #2281

Draft
mpretty-cyro wants to merge 1 commit into
session-foundation:devfrom
mpretty-cyro:disable-automatic-donation-cta
Draft

mpretty-cyro wants to merge 1 commit into
session-foundation:devfrom
mpretty-cyro:disable-automatic-donation-cta

Conversation

@mpretty-cyro

Copy link
Copy Markdown
Collaborator

The donation CTA is no longer shown automatically, either on its home-screen schedule (7 days after install, then 3, 7 and 21 days after each view) or after a positive in-app review.

Both triggers go through one switch, DonationManager.automaticDonationCTAEnabled, which is false. Setting it to true restores both triggers as they were.

  • Stored state is left alone while it's off. The gate comes before the code that clears a pending positive-review flag, so the flag, the view count and the last-seen time aren't read-and-cleared or written. Turning it back on picks up where it paused.
  • The review flow is unchanged. A positive review still sets the flag; nothing consumes it while the switch is off.
  • QA can still show the CTA. Setting the debug menu's "Show donation from app review" override to True bypasses the switch.
  • Settings → Donate is unchanged. It doesn't go through this check.

No UI, string or Settings changes.

Testing

  • New DonationManagerTest:
    • with the switch off, a due schedule and a pending review flag both return false and nothing is written;
    • the debug override still forces the CTA;
    • with the switch on, the existing behaviour holds.
  • The two "switch off" tests fail when the gate is removed.
  • Full testPlayDebugUnitTest passes: 468 tests, including InAppReviewManagerTest and InAppReviewViewModelTest.
  • Checked by hand on a playDebug build:
    • Settings → Donate opens the URL dialog;
    • the debug override shows the CTA on Home.

Neither the home-screen schedule nor a positive in-app review shows
the donation CTA any more. Both go through one switch,
DonationManager.automaticDonationCTAEnabled, which is off. The debug
menu's "show from review" override still forces the CTA for QA, and
the Settings Donate entry is unchanged.

@mpretty-cyro mpretty-cyro left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

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