diff options
| author | jacqueline <me@jacqueline.id.au> | 2024-04-02 20:41:36 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2024-04-02 20:41:36 +1100 |
| commit | 654fde5f6819cb52a198a524ab78d97e51ab97c7 (patch) | |
| tree | bad528f15ebfa35f4c1d9a0a027d01453495fb67 /src/system_fsm/running.cpp | |
| parent | 1e278d55c4dc0a9ae7b5b4511904202824e5c5df (diff) | |
| download | tangara-fw-654fde5f6819cb52a198a524ab78d97e51ab97c7.tar.gz | |
Support disabling automatic database updates
Diffstat (limited to 'src/system_fsm/running.cpp')
| -rw-r--r-- | src/system_fsm/running.cpp | 16 |
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; } |
