Temporary setup of alternative to advertisements

This commit is contained in:
Courtney Arnold 2026-09-19 20:45:59 -05:00
parent ad2d932842
commit 57a9793a40
14 changed files with 653 additions and 56 deletions

View file

@ -127,11 +127,21 @@ class _ConfirmFuelEntryScreenState extends State<ConfirmFuelEntryScreen> {
);
if (!mounted) return;
// The entry is already committed by this point, so the ad isn't
// gating the save — it just fills the moment between saving and
// landing back on the list. Awaited rather than fired off, so the
// two don't race and the ad can't end up drawn over the Receipts
// tab after this screen has gone.
final adShown = await appState.maybeShowFuelSaveAd();
if (!mounted) return;
// Ask while this screen (and its context) is still fully alive,
// before popping — simpler than trying to show a dialog against a
// context whose widget is mid-removal.
// context whose widget is mid-removal. Held back when an ad just
// ran: one full-screen surface per save, and the reminder comes
// back around on the next save anyway.
var wantsBackupSetup = false;
if (!appState.hasCloudBackupConfigured) {
if (!adShown && !appState.hasCloudBackupConfigured) {
wantsBackupSetup = await showBackupReminderDialog(context);
if (!mounted) return;
}