修复toastShadow设置ColoringStrategy.INVERT时颜色问题

Signed-off-by: Zhang Jinyu <zhangjinyu101@huawei.com>
This commit is contained in:
Zhang Jinyu 2024-08-20 17:10:55 +08:00
parent e383627ce0
commit 643f0b331c

View File

@ -316,7 +316,6 @@ void GetToastShadow(napi_env env, napi_value shadowNApi, std::optional<Shadow>&
Shadow shadowProps;
napi_valuetype valueType = napi_undefined;
napi_typeof(env, shadowNApi, &valueType);
GetShadowFromTheme(ShadowStyle::OuterDefaultMD, shadowProps);
if (valueType == napi_number) {
int32_t num = 0;
napi_get_value_int32(env, shadowNApi, &num);
@ -354,6 +353,8 @@ void GetToastShadow(napi_env env, napi_value shadowNApi, std::optional<Shadow>&
}
}
GetToastObjectShadow(env, shadowNApi, shadowProps);
} else {
GetShadowFromTheme(ShadowStyle::OuterDefaultMD, shadowProps);
}
shadow = shadowProps;
}