mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-10 06:54:19 +00:00
Loader: Warn about missing SD card for main apps (#3875)
Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
parent
4fd76524c9
commit
6a1c27ef93
1 changed files with 13 additions and 3 deletions
|
@ -94,10 +94,20 @@ static void loader_show_gui_error(
|
|||
if(status.value == LoaderStatusErrorUnknownApp &&
|
||||
loader_find_external_application_by_name(name) != NULL) {
|
||||
// Special case for external apps
|
||||
dialog_message_set_header(message, "Update needed", 64, 3, AlignCenter, AlignTop);
|
||||
const char* header = NULL;
|
||||
const char* text = NULL;
|
||||
Storage* storage = furi_record_open(RECORD_STORAGE);
|
||||
if(storage_sd_status(storage) == FSE_OK) {
|
||||
header = "Update needed";
|
||||
text = "Update firmware\nto run this app";
|
||||
} else {
|
||||
header = "SD card needed";
|
||||
text = "Install SD card\nto run this app";
|
||||
}
|
||||
furi_record_close(RECORD_STORAGE);
|
||||
dialog_message_set_header(message, header, 64, 3, AlignCenter, AlignTop);
|
||||
dialog_message_set_icon(message, &I_WarningDolphinFlip_45x42, 83, 22);
|
||||
dialog_message_set_text(
|
||||
message, "Update firmware\nto run this app", 3, 26, AlignLeft, AlignTop);
|
||||
dialog_message_set_text(message, text, 3, 26, AlignLeft, AlignTop);
|
||||
dialog_message_show(dialogs, message);
|
||||
} else if(status.value == LoaderStatusErrorUnknownApp) {
|
||||
loader_dialog_prepare_and_show(dialogs, &err_app_not_found);
|
||||
|
|
Loading…
Reference in a new issue