From: Caisking <3449750381@qq.com> Date: Sat, 17 Aug 2024 09:31:07 +0000 (+0800) Subject: 修复同状态下更改睡眠配置不更新的bug X-Git-Tag: release_V1.2.70_20241020_135402~644 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=9fbeb43951eabde86733f96ec6f219684be182fa;p=mirrors%2FFD230.git 修复同状态下更改睡眠配置不更新的bug --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/sleep/src/SleepModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/sleep/src/SleepModel.cpp index e66efd33d..a1bc6a07b 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/sleep/src/SleepModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/sleep/src/SleepModel.cpp @@ -39,6 +39,7 @@ #include #include "thread_adapter.h" #include "cmsis_os.h" +#include "ui_service.h" extern "C" errcode_t uapi_get_TIME_STR(uint32_t time, char *p_time, char date_separator, char time_separator, date_format_t format); extern "C" int get_sleep_time_from_config_model(void); @@ -617,6 +618,9 @@ namespace OHOS total_minutes += 60; // 转换为正数,加60分钟 } goal_total_time = total_hours; // 确保最小时间为0小时 + + /*通知界面更新*/ + SendMsgToUIService(UI_UPDATE_SLEEP_DATA, 0, nullptr, 0); } // 获取睡眠总时长(小时) int SleepModel::get_sleep_hour()