diff --git a/src/system_fsm/running.cpp b/src/system_fsm/running.cpp index 14c5f28b..ec146029 100644 --- a/src/system_fsm/running.cpp +++ b/src/system_fsm/running.cpp @@ -142,6 +142,17 @@ auto Running::mountStorage() -> bool { std::unique_ptr{database_res.value()}); ESP_LOGI(kTag, "storage loaded okay"); + + // Tell the database to refresh so that we pick up any changes from the newly + // mounted card. + sServices->bg_worker().Dispatch([&]() { + auto db = sServices->database().lock(); + if (!db) { + return; + } + db->updateIndexes(); + }); + return true; }