diff --git a/applications/services/desktop/desktop_settings.h b/applications/services/desktop/desktop_settings.h index 5946873f0..5f06afa19 100644 --- a/applications/services/desktop/desktop_settings.h +++ b/applications/services/desktop/desktop_settings.h @@ -8,7 +8,7 @@ #include #include -#define DESKTOP_SETTINGS_VER (10) +#define DESKTOP_SETTINGS_VER (11) #define DESKTOP_SETTINGS_PATH INT_PATH(DESKTOP_SETTINGS_FILE_NAME) #define DESKTOP_SETTINGS_MAGIC (0x17) diff --git a/applications/services/desktop/scenes/desktop_scene_main.c b/applications/services/desktop/scenes/desktop_scene_main.c index 420775489..d11b7a585 100644 --- a/applications/services/desktop/scenes/desktop_scene_main.c +++ b/applications/services/desktop/scenes/desktop_scene_main.c @@ -70,7 +70,7 @@ 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) > 0) { + if(strlen(application->name_or_path) > 4) { loader_start_with_gui_error(desktop->loader, application->name_or_path, NULL); } else { // No favourite app is set! So we skipping this part diff --git a/applications/settings/desktop_settings/scenes/desktop_settings_scene_favorite.c b/applications/settings/desktop_settings/scenes/desktop_settings_scene_favorite.c index 6ca793a54..d54989814 100644 --- a/applications/settings/desktop_settings/scenes/desktop_settings_scene_favorite.c +++ b/applications/settings/desktop_settings/scenes/desktop_settings_scene_favorite.c @@ -6,6 +6,7 @@ #define EXTERNAL_APPLICATION_NAME ("[External Application]") #define EXTERNAL_APPLICATION_INDEX (FLIPPER_APPS_COUNT + 1) +#define NONE_APPLICATION_INDEX (FLIPPER_APPS_COUNT + 2) static bool favorite_fap_selector_item_callback( FuriString* file_path, @@ -89,7 +90,7 @@ void desktop_settings_scene_favorite_on_enter(void* context) { submenu_add_item( submenu, "None (disable)", - FLIPPER_APPS_COUNT + 2, + NONE_APPLICATION_INDEX, desktop_settings_scene_favorite_submenu_callback, app); @@ -154,6 +155,10 @@ bool desktop_settings_scene_favorite_on_event(void* context, SceneManagerEvent e MAX_APP_LENGTH); consumed = true; } + } else if(event.event == NONE_APPLICATION_INDEX) { + curr_favorite_app->is_external = false; + strncpy(curr_favorite_app->name_or_path, "no", MAX_APP_LENGTH); + consumed = true; } else { curr_favorite_app->is_external = false; strncpy(