Commit f357ec1a authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

list_views: Trigger an update when list isn't empty anymore

parent de41b5b2
......@@ -50,7 +50,7 @@ typedef struct view_sys view_sys;
typedef struct view_sys_cb {
view_sys* p_sys;
void (*pf_updated)( view_sys* p_sys );
void (*pf_updated)( view_sys* p_sys, bool b_empty );
} view_sys_cb;
typedef enum interface_view_event {
......
......@@ -104,6 +104,7 @@ audio_list_artist_view_append_item(list_sys *p_sys, void* p_data)
/* */
elm_object_item_del_cb_set(it, free_list_item_data);
p_sys->p_view_cb->pf_updated(p_sys->p_view_cb->p_sys, false);
return ali;
}
......
......@@ -173,6 +173,7 @@ audio_list_song_view_append_item(list_sys *p_sys, void* p_data)
/* */
elm_object_item_del_cb_set(it, free_list_item_data);
audio_list_song_check_empty(p_sys);
p_sys->p_view_cb->pf_updated(p_sys->p_view_cb->p_sys, false);
return ali;
}
......
......@@ -213,7 +213,7 @@ audio_view_has_menu(view_sys *p_view_sys)
}
static void
audio_view_content_changed_cb(view_sys* p_view_sys)
audio_view_content_changed_cb(view_sys* p_view_sys, bool b_empty)
{
}
......
......@@ -100,7 +100,7 @@ video_view_has_menu(view_sys *p_view_sys)
}
static void
video_video_content_updated_cb(view_sys* p_view_sys)
video_video_content_updated_cb(view_sys* p_view_sys, bool b_empty)
{
}
......
......@@ -218,6 +218,7 @@ video_view_append_item(list_sys *p_list, void* p_data)
/* */
elm_object_item_del_cb_set(vli->p_object_item, free_list_item);
genlist_update_empty_view(p_list);
p_list->p_view_cb->pf_updated(p_list->p_view_cb->p_sys, false);
return vli;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment