#662,解决手表,手电筒设置,5个灯光颜色都选择一遍,灯光颜色不会改变bug
authorluozheng <1732036298@qq.com>
Fri, 13 Sep 2024 11:05:23 +0000 (19:05 +0800)
committerluozheng <1732036298@qq.com>
Fri, 13 Sep 2024 11:05:23 +0000 (19:05 +0800)
code/sdk/application/wearable/fd230app/nativeui/alarm/src/MainAlarmView.cpp
code/sdk/application/wearable/fd230app/nativeui/flashlight/include/FlashlightView.h
code/sdk/application/wearable/fd230app/nativeui/flashlight/src/FlashlightModel.cpp
code/sdk/application/wearable/fd230app/nativeui/flashlight/src/FlashlightView.cpp

index 6f58e6a..03e6f92 100644 (file)
@@ -433,7 +433,7 @@ void MainAlarmView::LabelGetWeek(uint8_t week, int16_t alarmNum)
         dLabel[alarmNum]->SetText(weekStr.c_str());
     else
         dLabel[alarmNum]->SetText(weekStr_en.c_str());
-    dLabel[alarmNum]->ForceResetText();
+    // dLabel[alarmNum]->ForceResetText();
 }
 
 bool MainAlarmView::GetRefreshStatus(void)
index 00e53d1..a4aa0ff 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-04-10 17:32:02
  * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-04-10 21:17:05
+ * @LastEditTime: 2024-09-13 18:55:12
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/flashligh/include/FlashlightView.h
  */
 
@@ -45,6 +45,7 @@ namespace OHOS
         void GetValueByColorCustomSelectedImage(int16_t x, int16_t y, int64_t * value);
         void GetPointByColorCustomSelectedImage(int16_t * x, int16_t * y, int64_t value);
         void UpdateViewMainScreenFlashing(bool flag);
+        void UpdateViewMainScreenColor();
 
         typedef enum
         {
index 36b6f24..6468286 100644 (file)
@@ -152,7 +152,7 @@ namespace OHOS
     {
         if (g_timer != NULL)
         {
-            osTimerStop(g_timer);
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "FlashlightModel::FlashlightStopTimer");
             osStatus_t ret = osOK;
             ret = osTimerStop(g_timer);
             if (ret != osOK)
index 885f26f..49ca0a2 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-04-10 17:32:08
  * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-08-28 20:47:00
+ * @LastEditTime: 2024-09-13 18:59:42
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/flashligh/src/FlashlightView.cpp
  */
 #include "flashlight/include/FlashlightView.h"
@@ -212,6 +212,14 @@ namespace OHOS
         Draw();
     }
 
+    void FlashlightView::UpdateViewMainScreenColor()
+    {
+        if(GroupMain_) 
+        {
+            GroupMain_->SetStyle(STYLE_BACKGROUND_COLOR, presenter_->GetColorValue());
+        }
+    }
+
     void FlashlightView::UpdateViewMainScreen(void)
     {
         if(nullptr == SwipeView_)
@@ -219,6 +227,7 @@ namespace OHOS
         
         SwipeView_->SetCurrentPage(0);
 
+        UpdateViewMainScreenColor();
         if(0 == presenter_->GetFlashingLevel())
             UpdateViewMainScreenFlashing(false);
         else