[FL-1061] iButton save and load from sd card (#394)
* SD App: fix queue adresses * sd-filesystem: fix making path on file select event * ibutton: add key reading from sd card * ibutton: save ibutton key to sd card * ibutton: add deleting keys from sd card * ibutton: remove KeyStore from application * ibutton: make directory if necessary on key save Co-authored-by: DrZlo13 <who.just.the.doctor@gmail.com> Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -96,6 +96,9 @@ static bool file_select_input_callback(InputEvent* event, void* context) {
|
||||
return true;
|
||||
});
|
||||
consumed = true;
|
||||
if(!file_select_fill_strings(file_select)) {
|
||||
file_select->callback(false, file_select->context);
|
||||
}
|
||||
} else if(event->key == InputKeyDown) {
|
||||
with_view_model(
|
||||
file_select->view, (FileSelectModel * model) {
|
||||
@@ -121,6 +124,9 @@ static bool file_select_input_callback(InputEvent* event, void* context) {
|
||||
return true;
|
||||
});
|
||||
consumed = true;
|
||||
if(!file_select_fill_strings(file_select)) {
|
||||
file_select->callback(false, file_select->context);
|
||||
}
|
||||
} else if(event->key == InputKeyOk) {
|
||||
if(file_select->callback != NULL) {
|
||||
const char* result;
|
||||
@@ -138,10 +144,6 @@ static bool file_select_input_callback(InputEvent* event, void* context) {
|
||||
}
|
||||
consumed = true;
|
||||
}
|
||||
|
||||
if(!file_select_fill_strings(file_select)) {
|
||||
file_select->callback(false, file_select->context);
|
||||
}
|
||||
}
|
||||
|
||||
return consumed;
|
||||
@@ -207,6 +209,8 @@ void file_select_set_api(FileSelect* file_select, FS_Api* fs_api) {
|
||||
}
|
||||
|
||||
void file_select_set_callback(FileSelect* file_select, FileSelectCallback callback, void* context) {
|
||||
file_select->context = context;
|
||||
file_select->callback = callback;
|
||||
}
|
||||
|
||||
void file_select_set_filter(FileSelect* file_select, const char* path, const char* extension) {
|
||||
|
Reference in New Issue
Block a user