Backlight Fix #2: only if LoaderStatusOk --nobuild

This commit is contained in:
ClaraCrazy
2023-09-30 22:55:52 +02:00
parent f8e9f8ffdd
commit 0adbf1ec1d

View File

@@ -54,13 +54,13 @@ static void loader_cli_open(FuriString* args, Loader* loader) {
const char* app_name_str = furi_string_get_cstr(app_name);
NotificationApp* notifications = furi_record_open(RECORD_NOTIFICATION);
notification_message(notifications, &sequence_display_backlight_on);
furi_record_close(RECORD_NOTIFICATION);
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));
} else {
NotificationApp* notifications = furi_record_open(RECORD_NOTIFICATION);
notification_message(notifications, &sequence_display_backlight_on);
furi_record_close(RECORD_NOTIFICATION);
}
furi_string_free(error_message);
} while(false);