mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2025-02-17 05:48:33 +00:00
Skip browser inputs while loading / sorting
This commit is contained in:
parent
3accc005e7
commit
fbf99d6cb3
2 changed files with 9 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue