This is an automated email from the ASF dual-hosted git repository. jianhan pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-weex.git
The following commit(s) were added to refs/heads/master by this push: new 27d6bb0 [iOS] Fix dark-scheme animation logic. new f72fc93 Merge pull request #3045 from wqyfavor/dark-mode-dev 27d6bb0 is described below commit 27d6bb0d13a58c36e18618c874b1565f3bf45f24 Author: qianyuan.wqy <qianyuan....@taobao.com> AuthorDate: Sun Dec 1 11:10:10 2019 +0800 [iOS] Fix dark-scheme animation logic. --- ios/sdk/WeexSDK/Sources/Module/WXAnimationModule.m | 8 +++----- ios/sdk/WeexSDK/Sources/Module/WXTransition.mm | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/ios/sdk/WeexSDK/Sources/Module/WXAnimationModule.m b/ios/sdk/WeexSDK/Sources/Module/WXAnimationModule.m index 67a19a5..147ec6e 100644 --- a/ios/sdk/WeexSDK/Sources/Module/WXAnimationModule.m +++ b/ios/sdk/WeexSDK/Sources/Module/WXAnimationModule.m @@ -229,15 +229,13 @@ WX_EXPORT_METHOD(@selector(transition:args:callback:)) } } else if ([property isEqualToString:@"weexDarkSchemeBackgroundColor"]) { - if (!isDarkScheme || componentRawStyles[@"weexDarkSchemeBackgroundColor"] == nil) { - /* Do not do animation for "darkSchemeBackgroundColor" in light mode. - Or there is no dark bg color explicitly defined in styles. - */ + if (!isDarkScheme) { + /* Do not do animation for "darkSchemeBackgroundColor" in light mode. */ continue; } } else if ([property isEqualToString:@"weexLightSchemeBackgroundColor"]){ - if (isDarkScheme || componentRawStyles[@"weexLightSchemeBackgroundColor"] == nil) { + if (isDarkScheme) { continue; } } diff --git a/ios/sdk/WeexSDK/Sources/Module/WXTransition.mm b/ios/sdk/WeexSDK/Sources/Module/WXTransition.mm index e52c5ba..7613e9e 100644 --- a/ios/sdk/WeexSDK/Sources/Module/WXTransition.mm +++ b/ios/sdk/WeexSDK/Sources/Module/WXTransition.mm @@ -133,16 +133,14 @@ } } else if ([key isEqualToString:@"weexDarkSchemeBackgroundColor"]) { - if (!isDarkScheme || componentRawStyles[@"weexDarkSchemeBackgroundColor"] == nil) { - /* Do not do animation for "darkSchemeBackgroundColor" in light mode. - Or there is no dark bg color explicitly defined in styles. - */ + if (!isDarkScheme) { + /* Do not do animation for "darkSchemeBackgroundColor" in light mode. */ [futileStyles setObject:styles[key] forKey:key]; continue; } } else if ([key isEqualToString:@"weexLightSchemeBackgroundColor"]){ - if (isDarkScheme || componentRawStyles[@"weexLightSchemeBackgroundColor"] == nil) { + if (isDarkScheme) { [futileStyles setObject:styles[key] forKey:key]; continue; }