mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-06 05:19:09 -07:00
Remove app prefix in mainmenu editor
This commit is contained in:
@@ -42,6 +42,12 @@ static void
|
||||
Storage* storage = furi_record_open(RECORD_STORAGE);
|
||||
flipper_application_load_name_and_icon(temp_path, storage, NULL, temp_path);
|
||||
furi_record_close(RECORD_STORAGE);
|
||||
if(furi_string_start_with_str(temp_path, "[")) {
|
||||
size_t trim = furi_string_search_str(temp_path, "] ", 1);
|
||||
if(trim != FURI_STRING_FAILURE) {
|
||||
furi_string_right(temp_path, trim + 2);
|
||||
}
|
||||
}
|
||||
CharList_push_back(app->mainmenu_app_labels, strdup(furi_string_get_cstr(temp_path)));
|
||||
app->mainmenu_app_index = CharList_size(app->mainmenu_app_labels) - 1;
|
||||
app->save_mainmenu_apps = true;
|
||||
|
||||
@@ -243,6 +243,12 @@ XtremeApp* xtreme_app_alloc() {
|
||||
furi_string_replace_all(line, "\n", "");
|
||||
CharList_push_back(app->mainmenu_app_exes, strdup(furi_string_get_cstr(line)));
|
||||
flipper_application_load_name_and_icon(line, storage, NULL, line);
|
||||
if(furi_string_start_with_str(line, "[")) {
|
||||
size_t trim = furi_string_search_str(line, "] ", 1);
|
||||
if(trim != FURI_STRING_FAILURE) {
|
||||
furi_string_right(line, trim + 2);
|
||||
}
|
||||
}
|
||||
CharList_push_back(app->mainmenu_app_labels, strdup(furi_string_get_cstr(line)));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user