[TSAM-5948] Corrected split album updation logic on selall CB 59/78159/1 submit/tizen_mobile/20160704.155421
authorRahul Dadhich <r.dadhich@samsung.com>
Mon, 4 Jul 2016 11:04:22 +0000 (16:34 +0530)
committerRahul Dadhich <r.dadhich@samsung.com>
Mon, 4 Jul 2016 11:04:22 +0000 (16:34 +0530)
Change-Id: I1b8b662b0656198a4fe6a6b43c4de4339818ce4c
Signed-off-by: Rahul Dadhich <r.dadhich@samsung.com>
src/features/gl-thumbs-sel.c

index a508101..0755cdb 100644 (file)
@@ -273,7 +273,17 @@ static void __gl_thumbs_sel_selall_cb(void *data, Evas_Object *obj, void *ei)
        _gl_notify_check_selall(ad, ad->albuminfo.nf_it_select, item_cnt,
                                sel_all_cnt);
        if (gitem->album->item) {
-               elm_gengrid_item_update(gitem->album->item);
+               int album_select_count = eina_list_count(gitem->album->elist);
+               if (album_select_count > 0) {
+                       elm_object_item_signal_emit(gitem->album->item,
+                                       "elm,state,elm.text.badge,visible",
+                                       "elm");
+               } else {
+                       elm_object_item_signal_emit(gitem->album->item,
+                                       "elm,state,elm.text.badge,hidden",
+                                       "elm");
+               }
+               elm_gengrid_item_fields_update(gitem->album->item, "elm.text.badge", ELM_GENGRID_ITEM_FIELD_TEXT);
        }
        /* Update the label text */
        _gl_ui_update_navi_title_text(ad->albuminfo.nf_it_select, total_sel_count, false);