Perform refresh and perform original action immediately afterwards

This commit is contained in:
twinaphex 2015-08-22 01:55:45 +02:00
parent 8454c712f2
commit 1a2a88cb8a

View File

@ -359,7 +359,13 @@ int menu_entry_action(menu_entry_t *entry, unsigned i, enum menu_action action)
menu_file_list_cbs_t *cbs = menu_list_get_actiondata_at_offset(menu_list->selection_buf, i);
if (menu_entries_needs_refresh())
action = MENU_ACTION_REFRESH;
{
if (cbs && cbs->action_refresh)
{
cbs->action_refresh(menu_list->selection_buf, menu_list->menu_stack);
menu_entries_unset_refresh(false);
}
}
switch (action)
{
@ -407,15 +413,6 @@ int menu_entry_action(menu_entry_t *entry, unsigned i, enum menu_action action)
if (cbs && cbs->action_select)
ret = cbs->action_select(entry->path, entry->label, entry->type, i);
break;
case MENU_ACTION_REFRESH:
if (cbs && cbs->action_refresh)
{
ret = cbs->action_refresh(menu_list->selection_buf, menu_list->menu_stack);
menu_entries_unset_refresh(false);
}
break;
case MENU_ACTION_MESSAGE:
{
menu_display_t *disp = menu_display_get_ptr();