完成提醒增加开关控制 1103/1 1103/head
authorhcj <1224667075@qq.com>
Fri, 4 Oct 2024 12:38:31 +0000 (20:38 +0800)
committerhcj <1224667075@qq.com>
Fri, 4 Oct 2024 12:38:31 +0000 (20:38 +0800)
code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp

index 3c38cc2..b50a695 100644 (file)
@@ -409,10 +409,14 @@ void MsgCenterNotifystepProc(const Topic topic, Request* req)
 
      if(OHOS::GoalModel::GetInstance().getstepvalue()>=100)
     {
+
         goal_type=GOAL_STEP;
         if(get_Is_shouw_falg(goal_type))
         {   
-            CustomEventPublish(TOPIC_EVENT_GOAL_SHOW_VIEW,(uint8_t *)&goal_type,1);
+            if(0==ConfigModel::GetInstance()->get_configData_int(ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_STEP))
+            {
+             CustomEventPublish(TOPIC_EVENT_GOAL_SHOW_VIEW,(uint8_t *)&goal_type,1);
+            }
         }
     }
 
@@ -421,7 +425,11 @@ void MsgCenterNotifystepProc(const Topic topic, Request* req)
         goal_type=GOAL_DISTANCE;
         if(get_Is_shouw_falg(goal_type))
         {   
-            CustomEventPublish(TOPIC_EVENT_GOAL_SHOW_VIEW,(uint8_t *)&goal_type,1);
+            if(ConfigModel::GetInstance()->get_configData_int(ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_OTHER))
+            {
+                 CustomEventPublish(TOPIC_EVENT_GOAL_SHOW_VIEW,(uint8_t *)&goal_type,1);
+            }
+           
         }
     }
 
@@ -430,7 +438,10 @@ void MsgCenterNotifystepProc(const Topic topic, Request* req)
         goal_type=GOAL_FAT;
         if(get_Is_shouw_falg(goal_type))
         {   
-            CustomEventPublish(TOPIC_EVENT_GOAL_SHOW_VIEW,(uint8_t *)&goal_type,1);
+           if(ConfigModel::GetInstance()->get_configData_int(ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_OTHER))
+            {
+                 CustomEventPublish(TOPIC_EVENT_GOAL_SHOW_VIEW,(uint8_t *)&goal_type,1);
+            }
         }
     }
 
@@ -439,7 +450,10 @@ void MsgCenterNotifystepProc(const Topic topic, Request* req)
         goal_type=GOAL_STAND;
         if(get_Is_shouw_falg(goal_type))
         {   
-            CustomEventPublish(TOPIC_EVENT_GOAL_SHOW_VIEW,(uint8_t *)&goal_type,1);
+           if(ConfigModel::GetInstance()->get_configData_int(ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_OTHER))
+            {
+                 CustomEventPublish(TOPIC_EVENT_GOAL_SHOW_VIEW,(uint8_t *)&goal_type,1);
+            }
         }
     }
 
@@ -448,7 +462,10 @@ void MsgCenterNotifystepProc(const Topic topic, Request* req)
         goal_type=GOAL_CALOREIE;
         if(get_Is_shouw_falg(goal_type))
         {   
-            CustomEventPublish(TOPIC_EVENT_GOAL_SHOW_VIEW,(uint8_t *)&goal_type,1);
+           if(ConfigModel::GetInstance()->get_configData_int(ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_OTHER))
+            {
+                 CustomEventPublish(TOPIC_EVENT_GOAL_SHOW_VIEW,(uint8_t *)&goal_type,1);
+            }
         }
     }