From 5bd535de08260f2789df620f6317a121f1e21b08 Mon Sep 17 00:00:00 2001 From: Rahul Dadhich Date: Mon, 10 Oct 2016 12:37:08 +0530 Subject: [PATCH] [TSAM-8695] Updated sel list on mediadb update CB Change-Id: I3ecc170a8777cf30f38d98a02b712440753afc5e Signed-off-by: Rahul Dadhich --- src/2dview/gl-timeline.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/2dview/gl-timeline.c b/src/2dview/gl-timeline.c index e2d7c23..92ab0ff 100644 --- a/src/2dview/gl-timeline.c +++ b/src/2dview/gl-timeline.c @@ -2340,6 +2340,38 @@ bool _gl_check_no_content_view(void *data) return false; } +static void _gl_timeline_update_selected_info(void *data) +{ + GL_CHECK(data); + gl_appdata *ad = (gl_appdata *)data; + GL_CHECK(ad->tlinfo); + GL_CHECK(ad->tlinfo->sel_d); + char *item = NULL; + gl_media_s *item1 = NULL; + bool in_list = false; + Eina_List *l; + int i; + EINA_LIST_FOREACH(ad->tlinfo->sel_d->sel_list, l, item) { + if (!item) { + continue; + } + in_list = false; + for (i = 0; i < eina_list_count(ad->tlinfo->data_list); i++) { + item1 = eina_list_nth(ad->tlinfo->data_list, i); + if (!item) { + continue; + } + if (!strcmp(item1->uuid, item)) { + in_list = true; + break; + } + } + if (!in_list) { + __gl_timeline_sel_remove_item(ad->tlinfo, item); + } + } +} + int _gl_timeline_update_view(void *data) { GL_CHECK_VAL(data, -1); @@ -2364,6 +2396,10 @@ int _gl_timeline_update_view(void *data) __gl_timeline_change_mode(data, GL_TL_VIEW_NORMAL); _gl_del_popup(data); } + if (ad->tlinfo->view_m != GL_TL_VIEW_NORMAL) + { + _gl_timeline_update_selected_info(data); + } /* Update buttons state */ __gl_timeline_reset_btns(data); /* Update naviframe item title */ -- 2.7.4