Implement nonblocking_refresh

This commit is contained in:
twinaphex 2015-02-27 08:52:44 +01:00
parent cf070fa9f3
commit e7fe92748b
3 changed files with 6 additions and 1 deletions

View File

@ -117,6 +117,7 @@ typedef struct
} categories;
bool need_refresh;
bool nonblocking_refresh;
bool msg_force;
bool push_start_screen;

View File

@ -1567,6 +1567,8 @@ int cb_core_updater_list(void *data_, size_t len)
menu_list_populate_generic(list, core_updater_list_path,
core_updater_list_label, core_updater_list_type);
driver.menu->nonblocking_refresh = false;
return 0;
}
#endif
@ -1615,6 +1617,8 @@ static int deferred_push_core_updater_list(void *data, void *userdata,
msg_queue_push(g_extern.http.msg_queue, url_path, 0, 1);
#endif
driver.menu->nonblocking_refresh = true;
return 0;
}

View File

@ -632,7 +632,7 @@ static int action_iterate_main(const char *label, unsigned action)
return action_iterate_custom_bind(label, action);
}
if (menu->need_refresh && action != MENU_ACTION_MESSAGE)
if (menu->need_refresh && !menu->nonblocking_refresh && action != MENU_ACTION_MESSAGE)
action = MENU_ACTION_REFRESH;
switch (action)