[TIZENIOT-1968] Show All Doesn't Turn On when All Apps are turned on in notification... 61/245061/1 submit/tizen/20200930.072028 submit/tizen/20201001.112733
authorallu.k <allu.k@samsung.com>
Wed, 30 Sep 2020 06:25:27 +0000 (11:55 +0530)
committerallu.k <allu.k@samsung.com>
Wed, 30 Sep 2020 06:25:51 +0000 (11:55 +0530)
Change-Id: I449887c5bc8a57cd6a8eed526fe07f61d7f22d38

inc/app-details.h
src/app-details.c
src/main.c

index 858d86d1b3b7831f7bb3b638835c974d8ae645a8..01e16584fcaad6c7fe749b160370ab94d2c51c06 100644 (file)
@@ -57,6 +57,13 @@ void set_app_info(item_info_s *data_list);
  */
 void allow_noti_status_set(Eina_Bool value);
 
+/**
+ * @brief Sets allow-noti status top
+ *
+ * @param[in] bool   status
+ */
+void allow_noti_status_set_top(Eina_Bool value);
+
 /**
  * @brief Sets check
  *
index feb9253edaf2452c5c1f40b6fed42f71ce242f04..98e1e54e8ee4e37354409a0894e8b6afe3269fc9 100644 (file)
@@ -229,9 +229,18 @@ void allow_noti_status_set(Eina_Bool value)
 {
        popup_noti_status_set(value);
        app_badge_status_set(value);
+       set_allow_to_nofity(g_app_info->appid, value);
        if (value == EINA_FALSE && g_check) {
                        elm_check_state_set(g_check, EINA_FALSE);
+       }else if(value == EINA_TRUE && g_check){
+                       elm_check_state_set(g_check, check_all_status_get(get_app_ui_data()));
        }
+}
+
+void allow_noti_status_set_top(Eina_Bool value)
+{
+       popup_noti_status_set(value);
+       app_badge_status_set(value);
        set_allow_to_nofity(g_app_info->appid, value);
 }
 
index 427d4afbd4963e076fa8988ecc45caf2dd9cd3fe..dd7432bdee5690886874d90e6e7f419829bcfcfd 100644 (file)
@@ -87,11 +87,21 @@ static void allow_all_noti_changed_cb(void *data, Evas_Object *obj, void *event_
                while (gen_item) {
                        item_info_s *item = (item_info_s *)elm_object_item_data_get(gen_item);
                        set_app_info(item);
-                       allow_noti_status_set(true);
+                       allow_noti_status_set_top(true);
                        Evas_Object *check = item->my_check;
                        elm_check_state_set(check, true);
                        gen_item = elm_genlist_item_next_get(gen_item);
                }
+       }else{
+               Elm_Object_Item *gen_item = elm_genlist_first_item_get(ugd->list_main);
+               while (gen_item) {
+                       item_info_s *item = (item_info_s *)elm_object_item_data_get(gen_item);
+                       set_app_info(item);
+                       allow_noti_status_set_top(false);
+                       Evas_Object *check = item->my_check;
+                       elm_check_state_set(check, false);
+                       gen_item = elm_genlist_item_next_get(gen_item);
+               }
        }
 }
 
@@ -342,7 +352,7 @@ static void _create_notif_view(void *data)
 
        elm_check_state_set(check, check_all_status_get(ugd));
        evas_object_smart_callback_add(check, "changed", allow_all_noti_changed_cb, ugd);
-  set_check(check);
+       set_check(check);
 }
 
 static Evas_Object *_create_fullview(Evas_Object *parent, ug_data *ugd, app_type type)