[FL-1962, FL-2464, FL-2465, FL-2466, FL-2560, FL-2637, FL-2595] Ibutton, Infrared, LfRFID GUI fixes (#1392)

* Ibutton, Infrared, LfRFID GUI fixes
* Loading screens update

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Nikolay Minaylov
2022-07-17 10:41:16 +03:00
committed by GitHub
parent edc6ca0c8f
commit 877c5c8122
30 changed files with 147 additions and 44 deletions

View File

@@ -846,6 +846,10 @@ static bool nfc_device_load_data(NfcDevice* dev, string_t path, bool show_dialog
string_init(temp_str);
bool deprecated_version = false;
if(dev->loading_cb) {
dev->loading_cb(dev->loading_cb_ctx, true);
}
do {
// Check existance of shadow file
nfc_device_get_shadow_path(path, temp_str);
@@ -887,6 +891,10 @@ static bool nfc_device_load_data(NfcDevice* dev, string_t path, bool show_dialog
parsed = true;
} while(false);
if(dev->loading_cb) {
dev->loading_cb(dev->loading_cb_ctx, false);
}
if((!parsed) && (show_dialog)) {
if(deprecated_version) {
dialog_message_show_storage_error(dev->dialogs, "File format deprecated");
@@ -1024,3 +1032,10 @@ bool nfc_device_restore(NfcDevice* dev, bool use_load_path) {
string_clear(path);
return restored;
}
void nfc_device_set_loading_callback(NfcDevice* dev, NfcLoadingCallback callback, void* context) {
furi_assert(dev);
dev->loading_cb = callback;
dev->loading_cb_ctx = context;
}