mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-13 13:09:49 +04:00
Skip browser inputs while loading / sorting
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user