Skip browser inputs while loading / sorting

This commit is contained in:
Willy-JL 2023-02-13 04:57:44 +00:00
parent 3accc005e7
commit fbf99d6cb3
2 changed files with 9 additions and 1 deletions

View file

@ -398,15 +398,20 @@ static bool archive_view_input(InputEvent* event, void* context) {
bool in_menu;
bool move_fav_mode;
bool is_loading;
with_view_model(
browser->view,
ArchiveBrowserViewModel * model,
{
in_menu = model->menu;
move_fav_mode = model->move_fav;
is_loading = model->folder_loading || model->list_loading;
},
false);
if(is_loading) {
return false;
}
if(in_menu) {
if(event->type != InputTypeShort) {
return true; // RETURN

View file

@ -646,7 +646,10 @@ static bool file_browser_view_input_callback(InputEvent* event, void* context) {
bool is_loading = false;
with_view_model(
browser->view, FileBrowserModel * model, { is_loading = model->folder_loading; }, false);
browser->view,
FileBrowserModel * model,
{ is_loading = model->folder_loading || model->list_loading; },
false);
if(is_loading) {
return false;