Fix model names on model select page with not yet converted models

Resolves #248
This commit is contained in:
Raphael Coeffic
2021-06-19 14:49:05 +02:00
parent cf5bb8d501
commit 82f60cdc81
3 changed files with 25 additions and 8 deletions
@@ -59,6 +59,9 @@ void convertRadioData(int version)
RAISE_ALERT(STR_STORAGE_WARNING, STR_SDCARD_CONVERSION_REQUIRE, NULL,
AU_NONE);
// Load models list before converting
modelslist.load();
unsigned converted = 0;
auto to_convert = modelslist.getModelsCount() + 1;
@@ -76,9 +79,6 @@ void convertRadioData(int version)
RTOS_WAIT_MS(200);
#endif
// Load models list before converting
modelslist.load();
const char* error = nullptr;
for (auto category_ptr : modelslist.getCategories()) {
for (auto model_ptr : *category_ptr) {