完成提醒增加开关控制
authorhcj <1224667075@qq.com>
Fri, 4 Oct 2024 12:38:31 +0000 (20:38 +0800)
committerSnickerSun <snickersun@163.com>
Thu, 10 Oct 2024 07:43:00 +0000 (15:43 +0800)
code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp

index fc88462..5ea9ec5 100644 (file)
@@ -413,10 +413,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);
+            }
         }
     }
 
@@ -425,7 +429,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);
+            }
+           
         }
     }
 
@@ -434,7 +442,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);
+            }
         }
     }
 
@@ -443,7 +454,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);
+            }
         }
     }
 
@@ -452,7 +466,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);
+            }
         }
     }