mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-09-14 15:16:40 +00:00
Contact updates (advert path cache, new/removed contacts, favourites) are lazily debounced (dirty_contacts_expiry, 5s) to avoid wearing flash on every mesh packet. CMD_REBOOT already flushed this before rebooting, but UITask::shutdown() -- the low-battery auto-shutdown and long-press power-off path -- didn't, so under continuous mesh traffic (which keeps re-arming the debounce timer) a pending write could sit unflushed for a whole session and be lost when one of those paths fired. Add MyMesh::flushDirtyContacts() and call it from shutdown() alongside the existing savePrefs()/saveRTCTime() flush. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>