You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ac...@apache.org on 2018/03/01 02:52:27 UTC

incubator-weex git commit: * [iOS] restart component display-link when updating style action takes effect on layout

Repository: incubator-weex
Updated Branches:
  refs/heads/master 22cbd5b11 -> 9d11a5da0


* [iOS] restart component display-link when updating style action takes effect on layout


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/9d11a5da
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/9d11a5da
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/9d11a5da

Branch: refs/heads/master
Commit: 9d11a5da045819b74c95797806ac8d1a08f845eb
Parents: 22cbd5b
Author: acton393 <zh...@gmail.com>
Authored: Thu Mar 1 10:51:44 2018 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Thu Mar 1 10:51:44 2018 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Model/WXComponent.m | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9d11a5da/ios/sdk/WeexSDK/Sources/Model/WXComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Model/WXComponent.m b/ios/sdk/WeexSDK/Sources/Model/WXComponent.m
index 3f4f1ce..55b591f 100644
--- a/ios/sdk/WeexSDK/Sources/Model/WXComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Model/WXComponent.m
@@ -582,6 +582,11 @@
     }
     if (isUpdateStyles) {
         [self _modifyStyles:styles];
+        if ([self needsLayout]) {
+            // call update style may take effect on layout, maybe the component
+            // displaylink has been paused, so we need to restart the component task, and it will auto-pause when task queue is empty.
+            [self.weexInstance.componentManager startComponentTasks];
+        }
     }
 }