修复applist第一次获取样式
authorCaisking <3449750381@qq.com>
Mon, 24 Jun 2024 03:31:28 +0000 (11:31 +0800)
committerCaisking <3449750381@qq.com>
Mon, 24 Jun 2024 03:31:28 +0000 (11:31 +0800)
code/sdk/application/wearable/fd230app/nativeui/themestyle/src/ThemeStyleModel.cpp

index 22223b8..f4febd1 100644 (file)
@@ -1,3 +1,9 @@
+/***
+ * @Date: 2024-06-22 18:08:25
+ * @LastEditors: Caisking 3449750381@qq.com
+ * @LastEditTime: 2024-06-24 11:30:12
+ * @FilePath: /XTS_FD230/FD230/code/sdk/application/wearable/fd230app/nativeui/themestyle/src/ThemeStyleModel.cpp
+ */
 /*
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-06-07 09:21:47
@@ -34,6 +40,7 @@ namespace OHOS
         int ret = UtilsGetValue(THEMESTYLE_KEY, temp, STYLE_VALUE_LEN); // 从文件系统或缓存中获取与指定键匹配的值。
         if (ret < 0)
         {
+            UtilsSetValue(THEMESTYLE_KEY, THEMESTYLE_VALUE_LIST); // 设置默认值
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "UtilsGetValue error,temp:%s,ret = %d", temp, ret);
             return ThemeStyle::APPLIST_STYLE;
         }