mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-12 12:42:30 +04:00
[FL-2837][FL-3270] Loader refaptoring: second encounter (#2779)
* Core: rename internal FlipperApplication to FlipperInternalApplication * FAP Loader: move load_name_and_icon to flipper_application library * Loader menu: rework api * View holder: move to gui service * Loader: simple "loading" worker * Loader: applications dialog * Loader: fapping * Update f18 api * Apps: remove fap_loader * Libs, flipper application: store args, rename thread allocation * Loader: error handling * Apps: use loader error handling * Loader: documentation * FBT: accomodate loader * Loader: do not raise gui error if loader is locked * Archive: accomodate loader * Loader: fix loading message * Flipper: drop some old dolphin legacy * Loader: generalize error construction Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
@@ -50,21 +50,11 @@ static void loader_cli_open(FuriString* args, Loader* loader) {
|
||||
|
||||
const char* app_name_str = furi_string_get_cstr(app_name);
|
||||
|
||||
LoaderStatus status = loader_start(loader, app_name_str, args_str);
|
||||
|
||||
switch(status) {
|
||||
case LoaderStatusOk:
|
||||
break;
|
||||
case LoaderStatusErrorAppStarted:
|
||||
printf("Can't start, application is running");
|
||||
break;
|
||||
case LoaderStatusErrorUnknownApp:
|
||||
printf("%s doesn't exists\r\n", app_name_str);
|
||||
break;
|
||||
case LoaderStatusErrorInternal:
|
||||
printf("Internal error\r\n");
|
||||
break;
|
||||
FuriString* error_message = furi_string_alloc();
|
||||
if(loader_start(loader, app_name_str, args_str, error_message) != LoaderStatusOk) {
|
||||
printf("%s\r\n", furi_string_get_cstr(error_message));
|
||||
}
|
||||
furi_string_free(error_message);
|
||||
} while(false);
|
||||
|
||||
furi_string_free(app_name);
|
||||
|
||||
Reference in New Issue
Block a user