bug(daily-challenge): stale date cache when app runs past midnight #60

Open
opened 2026-05-28 01:51:03 +00:00 by funman300 · 0 comments
Owner

Bug

daily_challenge_plugin.rs caches the current date when the daily challenge is loaded. If the app stays open past midnight, the cached date becomes stale and the challenge is no longer for the correct day. The player can continue playing yesterday's challenge indefinitely without triggering a refresh.

Affected file

solitaire_engine/src/daily_challenge_plugin.rs

Fix

On each tick (or on app resume), compare the cached date against the current system date. If they differ, invalidate the cache and reload the challenge for the new date. Consider also handling the app-resume / foreground event on Android/iOS where the OS may have advanced the clock significantly.

## Bug `daily_challenge_plugin.rs` caches the current date when the daily challenge is loaded. If the app stays open past midnight, the cached date becomes stale and the challenge is no longer for the correct day. The player can continue playing yesterday's challenge indefinitely without triggering a refresh. ## Affected file `solitaire_engine/src/daily_challenge_plugin.rs` ## Fix On each tick (or on app resume), compare the cached date against the current system date. If they differ, invalidate the cache and reload the challenge for the new date. Consider also handling the app-resume / foreground event on Android/iOS where the OS may have advanced the clock significantly.
funman300 added the bugcorrectness labels 2026-05-28 01:51:03 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: funman300/Ferrous-Solitaire#60