From: hcj <1224667075@qq.com> Date: Fri, 4 Oct 2024 12:38:31 +0000 (+0800) Subject: 完成提醒增加开关控制 X-Git-Tag: release_V1.2.70_20241020_135402~190 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=49e265319052efb8bdba9ac5040b7eb0e9f70e47;p=mirrors%2FFD230.git 完成提醒增加开关控制 --- diff --git a/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp b/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp index fc8846205..5ea9ec528 100644 --- a/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp +++ b/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp @@ -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); + } } }