automatically update queue list headers when an item is removed

this is done manually in a few places but it's much more convenient
to enforce policy in the delete callback
This commit is contained in:
Mike Blumenkrantz 2016-02-08 11:52:46 -05:00
parent 8db5763d08
commit 86f5a0324e
1 changed files with 3 additions and 0 deletions

View File

@ -2635,6 +2635,7 @@ queue_list_item_del(Empd_Empdd_Song *so, Evas_Object *obj EINA_UNUSED)
{
Empd_Empdd_Song_free(sog);
elm_object_item_data_set(itg, Empd_Empdd_Song_copy(elm_object_item_data_get(it)));
elm_genlist_item_fields_update(itg, EMPC_TEXT_TIME, ELM_GENLIST_ITEM_FIELD_TEXT);
}
else if (!elm_genlist_item_subitems_count(itg))
{
@ -2647,6 +2648,8 @@ queue_list_item_del(Empd_Empdd_Song *so, Evas_Object *obj EINA_UNUSED)
queue_list_scroll_item = NULL;
elm_object_item_del(itg);
}
else
elm_genlist_item_fields_update(itg, EMPC_TEXT_TIME, ELM_GENLIST_ITEM_FIELD_TEXT);
}
Empd_Empdd_Song_free(so);
}