summaryrefslogtreecommitdiff
path: root/src/system_fsm/running.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/system_fsm/running.cpp')
-rw-r--r--src/system_fsm/running.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/system_fsm/running.cpp b/src/system_fsm/running.cpp
index a6ab5d47..8625ac66 100644
--- a/src/system_fsm/running.cpp
+++ b/src/system_fsm/running.cpp
@@ -166,13 +166,15 @@ auto Running::mountStorage() -> bool {
// Tell the database to refresh so that we pick up any changes from the newly
// mounted card.
- sServices->bg_worker().Dispatch<void>([&]() {
- auto db = sServices->database().lock();
- if (!db) {
- return;
- }
- db->updateIndexes();
- });
+ if (sServices->nvs().DbAutoIndex()) {
+ sServices->bg_worker().Dispatch<void>([&]() {
+ auto db = sServices->database().lock();
+ if (!db) {
+ return;
+ }
+ db->updateIndexes();
+ });
+ }
return true;
}