This commit is contained in:
MX 2023-07-13 23:22:55 +03:00
parent 65bbaca380
commit 015350c692
No known key found for this signature in database
GPG key ID: 7CCC66B7DBDD1C83
2 changed files with 6 additions and 3 deletions

View file

@ -72,7 +72,8 @@ static void desktop_scene_main_open_app_or_profile(Desktop* desktop, const char*
static void desktop_scene_main_start_favorite(Desktop* desktop, FavoriteApp* application) {
if(strlen(application->name_or_path) > 2) {
loader_start_with_gui_error(desktop->loader, application->name_or_path, NULL);
} else if(strlen(application->name_or_path) < 2) {
} else if(
(strlen(application->name_or_path) < 2) && (strcmp(application->name_or_path, "d") != 0)) {
loader_start(desktop->loader, LOADER_APPLICATIONS_NAME, NULL, NULL);
}
}

View file

@ -13,7 +13,7 @@
#define EXTERNAL_APPLICATION_NAME ("[External Application]")
#define EXTERNAL_APPLICATION_INDEX (APPS_COUNT + 2)
#define NONE_APPLICATION_INDEX (FLIPPER_APPS_COUNT + 3)
#define NONE_APPLICATION_INDEX (APPS_COUNT + 3)
#define PRESELECTED_SPECIAL 0xffffffff
@ -181,7 +181,9 @@ bool desktop_settings_scene_favorite_on_event(void* context, SceneManagerEvent e
consumed = true;
}
} else if(event.event == NONE_APPLICATION_INDEX) {
strncpy(curr_favorite_app->name_or_path, "n", MAX_APP_LENGTH);
// Clear favorite app path and set it to "d" (disabled)
memset(curr_favorite_app->name_or_path, 0, strlen(curr_favorite_app->name_or_path));
strncpy(curr_favorite_app->name_or_path, "d", MAX_APP_LENGTH);
consumed = true;
} else {
const char* name = favorite_fap_get_app_name(event.event);