消息:增加省电模式不进行消息弹窗
authorCaisking <3449750381@qq.com>
Wed, 9 Oct 2024 01:37:26 +0000 (09:37 +0800)
committerCaisking <3449750381@qq.com>
Wed, 9 Oct 2024 01:37:26 +0000 (09:37 +0800)
code/sdk/application/wearable/fd230app/nativeui/message/src/MessageModel.cpp
code/sdk/application/wearable/service/msg_center/src/notify/message_notification.cpp

index ca5f716..e98fd09 100644 (file)
@@ -130,9 +130,10 @@ extern "C"
             delete messageInfo; // 释放内存
 
             // 发送信息进行弹窗 
-            if(uapi_dev_runtime_get_train_status() == 1)
+            if(uapi_dev_runtime_get_train_status()||uapi_dev_runtime_get_saveele_status())
             {
-                //增加训练模式下,不弹窗
+              //增加训练模式下,不弹窗
+              //省电模式,不弹窗
                 return;
             }
             CustomEventPublish(TOPIC_EVENT_MESSAGENOTE, NULL, 0);
index d948443..162c7f9 100644 (file)
@@ -62,6 +62,9 @@ namespace OHOS
     {
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MessageViewEventListener::OnDrag");
         UNUSED(view);
+        NotificationManager::GetInstance()->StopNotify();
+        // 点击关闭之后通知list进行刷新
+        SendMsgToUIService(UI_UPDATE_MESSAGE_DATA, 0, nullptr, 0);
         return true;
     }