[FL-1510] Archive: OK fix (#551)
This commit is contained in:
parent
0e8adcfdba
commit
c27d76d664
@ -554,25 +554,28 @@ static bool archive_view_input(InputEvent* event, void* context) {
|
|||||||
|
|
||||||
if(event->key == InputKeyOk) {
|
if(event->key == InputKeyOk) {
|
||||||
ArchiveFile_t* selected;
|
ArchiveFile_t* selected;
|
||||||
|
|
||||||
with_view_model(
|
with_view_model(
|
||||||
archive->view_archive_main, (ArchiveViewModel * model) {
|
archive->view_archive_main, (ArchiveViewModel * model) {
|
||||||
if(files_array_size(model->files) > 0) {
|
selected = files_array_size(model->files) > 0 ?
|
||||||
selected = files_array_get(model->files, model->idx);
|
files_array_get(model->files, model->idx) :
|
||||||
}
|
NULL;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
string_set(archive->browser.name, selected->name);
|
if(selected) {
|
||||||
if(selected->type == ArchiveFileTypeFolder) {
|
string_set(archive->browser.name, selected->name);
|
||||||
if(event->type == InputTypeShort) {
|
|
||||||
archive_enter_dir(archive, archive->browser.name);
|
if(selected->type == ArchiveFileTypeFolder) {
|
||||||
} else if(event->type == InputTypeLong) {
|
if(event->type == InputTypeShort) {
|
||||||
archive_show_file_menu(archive);
|
archive_enter_dir(archive, archive->browser.name);
|
||||||
}
|
} else if(event->type == InputTypeLong) {
|
||||||
} else {
|
archive_show_file_menu(archive);
|
||||||
if(event->type == InputTypeShort) {
|
}
|
||||||
archive_show_file_menu(archive);
|
} else {
|
||||||
|
if(event->type == InputTypeShort) {
|
||||||
|
archive_show_file_menu(archive);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user