From: luozheng <1732036298@qq.com> Date: Tue, 18 Jun 2024 06:43:57 +0000 (+0800) Subject: 解决显示方式和天气bug X-Git-Tag: release_V1.2.70_20241020_135402~991 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=995de82b4b3bab0605624007ed63c998941ad66d;p=mirrors%2FFD230.git 解决显示方式和天气bug --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/themestyle/include/ThemeStyleModel.h b/code/sdk/application/wearable/fd230app/nativeui/themestyle/include/ThemeStyleModel.h index de5fb1c39..2b5f3371c 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/themestyle/include/ThemeStyleModel.h +++ b/code/sdk/application/wearable/fd230app/nativeui/themestyle/include/ThemeStyleModel.h @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-06-14 09:40:13 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-06-14 18:28:15 + * @LastEditTime: 2024-06-18 14:42:57 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/themestyle/include/ThemeStyleModel.h */ #ifndef SET_THEMESTYLE_MODEL_H @@ -56,7 +56,6 @@ namespace OHOS virtual ~ThemeStyleModel(); ThemeStyleModel(const ThemeStyleModel &) = delete; ThemeStyleModel &operator=(const ThemeStyleModel &) = delete; - uint16_t ThemeStyleId; }; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/themestyle/src/ThemeStyleModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/themestyle/src/ThemeStyleModel.cpp index 87fbf7702..6da8835c8 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/themestyle/src/ThemeStyleModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/themestyle/src/ThemeStyleModel.cpp @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-06-07 09:21:47 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-06-14 19:14:47 + * @LastEditTime: 2024-06-18 14:42:50 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/set_desktop/src/ThemeStyleModel.cpp */ @@ -56,7 +56,6 @@ namespace OHOS { // 根据映射设置显示样式值 (void)UtilsSetValue(THEMESTYLE_KEY, ThemeStyleMap.at(style).c_str()); - SetSelectThemeStyleId(style); } else { @@ -67,13 +66,7 @@ namespace OHOS //获取选中的样式Id uint16_t ThemeStyleModel::GetSelectThemeStyleId(void) { - return ThemeStyleId; - } - - //设置选中的样式Id - void ThemeStyleModel::SetSelectThemeStyleId(uint16_t Id) - { - ThemeStyleId = Id; + return GetAppListDisplayStyle(); } } diff --git a/code/sdk/application/wearable/fd230app/nativeui/weather/src/WeatherModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/weather/src/WeatherModel.cpp index 142dddac0..fe5a43b95 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/weather/src/WeatherModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/weather/src/WeatherModel.cpp @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-04-08 18:40:09 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-06-15 17:50:19 + * @LastEditTime: 2024-06-18 11:21:26 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/weather/src/WeatherModel.cpp */ #include "weather/include/WeatherModel.h" @@ -146,7 +146,8 @@ namespace OHOS // 获取天气图片 std::string WeatherModel::GetWeatherImage() { - int index = Weather_data_t_now.iconNight; + //int index = Weather_data_t_now.iconNight;//夜晚天气图标 + int index = Weather_data_seven_data[0].iconDay;//白天天气图标 WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "iconNight:%d", index); return weather65x65[index]; }