This is an automated email from the ASF dual-hosted git repository.

moshen 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 8ce7d11  [iOS] fix interaction time bad case : keyboard show and input 
(addView)
     new 16779d1  Merge pull request #2763 from 
lucky-chen/bugfix/inteaction_badcase_ios
8ce7d11 is described below

commit 8ce7d11ac87971d16560d05c857ea80caea5c6d0
Author: zhongcang <[email protected]>
AuthorDate: Tue Jul 30 15:27:55 2019 +0800

    [iOS] fix interaction time bad case : keyboard show and input (addView)
---
 ios/sdk/WeexSDK/Sources/Component/WXEditComponent.mm   | 2 ++
 ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.h | 1 +
 ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.m | 5 ++---
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/ios/sdk/WeexSDK/Sources/Component/WXEditComponent.mm 
b/ios/sdk/WeexSDK/Sources/Component/WXEditComponent.mm
index 49135a1..60a91b3 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXEditComponent.mm
+++ b/ios/sdk/WeexSDK/Sources/Component/WXEditComponent.mm
@@ -232,6 +232,7 @@ WX_EXPORT_METHOD(@selector(setTextFormatter:))
 {
     if(self.view) {
         [self.view becomeFirstResponder];
+        self.weexInstance.apmInstance.forceStopRecordInteractionTime = YES;
     }
 }
 
@@ -846,6 +847,7 @@ WX_EXPORT_METHOD(@selector(setTextFormatter:))
         }else
         {
             [self.view becomeFirstResponder];
+             self.weexInstance.apmInstance.forceStopRecordInteractionTime = 
YES;
         }
     } else {
         if([self isDateType])
diff --git a/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.h 
b/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.h
index d6f3d45..e0e07f6 100644
--- a/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.h
+++ b/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.h
@@ -114,6 +114,7 @@ extern NSString* const VALUE_ERROR_CODE_DEFAULT;
 @property (nonatomic, assign) BOOL isStartRender;
 @property (nonatomic,assign)  BOOL  hasRecordFirstInterationView;
 @property (nonatomic, assign) BOOL isDownLoadFailed;
+@property (nonatomic, assign) BOOL forceStopRecordInteractionTime;
 @property (nonatomic,assign) double pageRatio;
 
 #pragma mark - basic method
diff --git a/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.m 
b/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.m
index a86d226..2ab2cb4 100644
--- a/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.m
+++ b/ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.m
@@ -123,7 +123,6 @@ NSString* const VALUE_ERROR_CODE_DEFAULT = @"0";
     BOOL _hasRecordInteractionTime;
     BOOL _hasRecordDownLoadStart;
     BOOL _hasRecordDownLoadEnd;
-    BOOL _forceRecordInteractionTime;
 }
 
 @property (nonatomic,strong) id<WXApmProtocol> apmProtocolInstance;
@@ -198,7 +197,7 @@ NSString* const VALUE_ERROR_CODE_DEFAULT = @"0";
     
     if ([KEY_PAGE_STAGES_INTERACTION isEqualToString:name]) {
         _hasRecordInteractionTime = YES;
-        if (_forceRecordInteractionTime) {
+        if (self.forceStopRecordInteractionTime) {
             return;
         }
     }
@@ -545,7 +544,7 @@ NSString* const VALUE_ERROR_CODE_DEFAULT = @"0";
 - (void) forceSetInteractionTime:(long) unixTime
 {
     [self onStageWithTime:KEY_PAGE_STAGES_INTERACTION time:unixTime];
-    _forceRecordInteractionTime=YES;
+    _forceStopRecordInteractionTime = YES;
 }
 
 @end

Reply via email to