From: hcj <1224667075@qq.com> Date: Fri, 4 Oct 2024 12:38:31 +0000 (+0800) Subject: 完成提醒增加开关控制 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F1103%2F1;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 3c38cc225..b50a69594 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 @@ -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); + } } }