Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
[iOS] fix interaction time bad case : keyboard show and input (addView)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucky-chen authored and zhongcang committed Jul 31, 2019
1 parent 1245432 commit 8ce7d11
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions ios/sdk/WeexSDK/Sources/Component/WXEditComponent.mm
Expand Up @@ -232,6 +232,7 @@ -(void)focus
{
if(self.view) {
[self.view becomeFirstResponder];
self.weexInstance.apmInstance.forceStopRecordInteractionTime = YES;
}
}

Expand Down Expand Up @@ -846,6 +847,7 @@ - (void)setAutofocus:(BOOL)b
}else
{
[self.view becomeFirstResponder];
self.weexInstance.apmInstance.forceStopRecordInteractionTime = YES;
}
} else {
if([self isDateType])
Expand Down
1 change: 1 addition & 0 deletions ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.h
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.m
Expand Up @@ -123,7 +123,6 @@ @interface WXApmForInstance ()
BOOL _hasRecordInteractionTime;
BOOL _hasRecordDownLoadStart;
BOOL _hasRecordDownLoadEnd;
BOOL _forceRecordInteractionTime;
}

@property (nonatomic,strong) id<WXApmProtocol> apmProtocolInstance;
Expand Down Expand Up @@ -198,7 +197,7 @@ - (void) onStageWithTime:(NSString*)name time:(long)unixTime

if ([KEY_PAGE_STAGES_INTERACTION isEqualToString:name]) {
_hasRecordInteractionTime = YES;
if (_forceRecordInteractionTime) {
if (self.forceStopRecordInteractionTime) {
return;
}
}
Expand Down Expand Up @@ -545,7 +544,7 @@ - (NSString*) templateInfo
- (void) forceSetInteractionTime:(long) unixTime
{
[self onStageWithTime:KEY_PAGE_STAGES_INTERACTION time:unixTime];
_forceRecordInteractionTime=YES;
_forceStopRecordInteractionTime = YES;
}

@end
Expand Down

0 comments on commit 8ce7d11

Please sign in to comment.