[FL-3008], [FL-2734], [FL-2766], [FL-2898] NFC bug fixes (#2098)

* nfc: rework mf classic update
* nfc: rename cache folder to .cache
* nfc: fix ATQA order bytes in nfc files
* file browser: add hide dot files option
* nfc: fix iso-14443-4 uid cards emulation
* nfc: fix unit tests

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
gornekich
2022-12-07 14:52:44 +04:00
committed by GitHub
parent c43ec414bb
commit 9a21dae29c
14 changed files with 88 additions and 60 deletions

View File

@@ -19,6 +19,7 @@ typedef struct DialogsApp DialogsApp;
* File browser dialog extra options
* @param extension file extension to be offered for selection
* @param skip_assets true - do not show assets folders
* @param hide_dot_files true - hide dot files
* @param icon file icon pointer, NULL for default icon
* @param hide_ext true - hide extensions for files
* @param item_loader_callback callback function for providing custom icon & entry name
@@ -27,6 +28,7 @@ typedef struct DialogsApp DialogsApp;
typedef struct {
const char* extension;
bool skip_assets;
bool hide_dot_files;
const Icon* icon;
bool hide_ext;
FileBrowserLoadItemCallback item_loader_callback;

View File

@@ -20,6 +20,7 @@ bool dialog_file_browser_show(
.file_icon = options ? options->icon : NULL,
.hide_ext = options ? options->hide_ext : true,
.skip_assets = options ? options->skip_assets : true,
.hide_dot_files = options ? options->hide_dot_files : true,
.preselected_filename = path,
.item_callback = options ? options->item_loader_callback : NULL,
.item_callback_context = options ? options->item_loader_context : NULL,

View File

@@ -11,6 +11,7 @@ typedef struct {
const char* extension;
bool skip_assets;
bool hide_ext;
bool hide_dot_files;
const Icon* file_icon;
FuriString* result_path;
FuriString* preselected_filename;

View File

@@ -38,7 +38,12 @@ bool dialogs_app_process_module_file_browser(const DialogsAppMessageDataFileBrow
file_browser_set_callback(
file_browser, dialogs_app_file_browser_callback, file_browser_context);
file_browser_configure(
file_browser, data->extension, data->skip_assets, data->file_icon, data->hide_ext);
file_browser,
data->extension,
data->skip_assets,
data->hide_dot_files,
data->file_icon,
data->hide_ext);
file_browser_set_item_callback(file_browser, data->item_callback, data->item_callback_context);
file_browser_start(file_browser, data->preselected_filename);