From 344b624efcfe41cb62c5958e3a21f78c65e177af Mon Sep 17 00:00:00 2001 From: MX <10697207+xMasterX@users.noreply.github.com> Date: Fri, 5 Apr 2024 08:57:34 +0300 Subject: [PATCH] fix apps loading logic --- .../services/desktop/scenes/desktop_scene_main.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/applications/services/desktop/scenes/desktop_scene_main.c b/applications/services/desktop/scenes/desktop_scene_main.c index 0c083a5d84..d6c334d7eb 100644 --- a/applications/services/desktop/scenes/desktop_scene_main.c +++ b/applications/services/desktop/scenes/desktop_scene_main.c @@ -68,17 +68,15 @@ static inline bool desktop_scene_main_check_none(const char* str) { static void desktop_scene_main_open_app_or_profile(Desktop* desktop, FavoriteApp* application) { bool load_ok = false; if(strlen(application->name_or_path) > 0) { - if(desktop_scene_main_check_none(application->name_or_path)) { - // skip loading - load_ok = true; - } else if( - loader_start(desktop->loader, application->name_or_path, NULL, NULL) == - LoaderStatusOk) { - load_ok = true; + if(!desktop_scene_main_check_none(application->name_or_path)) { + // Load app + loader_start_detached_with_gui_error(desktop->loader, application->name_or_path, NULL); } + load_ok = true; } + // In case of "default" setting if(!load_ok) { - loader_start(desktop->loader, "Passport", NULL, NULL); + loader_start_detached_with_gui_error(desktop->loader, "Passport", NULL); } } @@ -88,7 +86,7 @@ static void desktop_scene_main_start_favorite(Desktop* desktop, FavoriteApp* app loader_start_detached_with_gui_error(desktop->loader, application->name_or_path, NULL); } } else { - loader_start(desktop->loader, LOADER_APPLICATIONS_NAME, NULL, NULL); + loader_start_detached_with_gui_error(desktop->loader, LOADER_APPLICATIONS_NAME, NULL); } }