wqyfavor closed pull request #1902: * [iOS]ignore fixed element for 
interactionTime
URL: https://github.com/apache/incubator-weex/pull/1902
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/ios/sdk/WeexSDK/Sources/Model/WXComponent.mm 
b/ios/sdk/WeexSDK/Sources/Model/WXComponent.mm
index f69f506a4e..8a22834a95 100644
--- a/ios/sdk/WeexSDK/Sources/Model/WXComponent.mm
+++ b/ios/sdk/WeexSDK/Sources/Model/WXComponent.mm
@@ -595,6 +595,7 @@ - (BOOL)_insertSubcomponent:(WXComponent *)subcomponent 
atIndex:(NSInteger)index
     pthread_mutex_unlock(&_propertyMutex);
     
     if (subcomponent->_positionType == WXPositionTypeFixed) {
+        subcomponent.ignoreInteraction = YES;
         [self.weexInstance.componentManager addFixedComponent:subcomponent];
     }
     
diff --git a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance_performance.m 
b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance_performance.m
index db33597d31..8a9664b37c 100644
--- a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance_performance.m
+++ b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance_performance.m
@@ -45,7 +45,7 @@ - (void) recordComponentCreatePerformance:(double) diffTime 
forComponent:(WXComp
 /** on UI thread **/
 - (void)onViewLoad:(WXComponent *)targetComponent
 {
-    if (targetComponent.hasAdd) {
+    if (targetComponent.hasAdd || targetComponent.ignoreInteraction) {
         return;
     }
     targetComponent.hasAdd = true;
@@ -71,9 +71,6 @@ - (void) _handleRenderTime:(WXComponent*)targetComponent 
withModifyTime:(double)
     if (nil == targetComponent) {
         return;
     }
-    if (targetComponent.ignoreInteraction) {
-        return;
-    }
     double diff = modifyTime - self.renderTimeOrigin;
     if (diff > 8000) {
         return;


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to