From 053bc683468b9f1b3be3ab6545bd1988e3f6ab9d Mon Sep 17 00:00:00 2001 From: hcj <1224667075@qq.com> Date: Fri, 4 Oct 2024 20:38:31 +0800 Subject: [PATCH] =?utf8?q?=E5=AE=8C=E6=88=90=E6=8F=90=E9=86=92=E5=A2=9E?= =?utf8?q?=E5=8A=A0=E5=BC=80=E5=85=B3=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../msg_center/src/msg_center_customer.cpp | 27 +++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) 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); + } } } -- 2.17.1