Skip to content

Commit 6a80d4a

Browse files
committed
Reset lastInterval instead of lastActivity after time travel
1 parent 47920cd commit 6a80d4a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

AdjustIo/AIActivityHandler.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ - (BOOL)updateActivityState {
264264
double lastInterval = now - self.activityState.lastActivity;
265265
if (lastInterval < 0) {
266266
[AILogger error:@"Time travel!"];
267-
self.activityState.lastInterval = now;
267+
self.activityState.lastActivity = now;
268268
return YES;
269269
}
270270

AdjustIo/AIActivityState.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
@property (nonatomic, assign) double createdAt;
2424
@property (nonatomic, assign) double lastInterval;
2525

26-
- (void)resetSessionAttributes:(long)now;
26+
- (void)resetSessionAttributes:(double)now;
2727

2828
- (void)injectSessionAttributes:(AIPackageBuilder *)packageBilder;
2929
- (void)injectEventAttributes:(AIPackageBuilder *)packageBilder;

AdjustIo/AIActivityState.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ - (id)init {
2929
return self;
3030
}
3131

32-
- (void)resetSessionAttributes:(long)now {
32+
- (void)resetSessionAttributes:(double)now {
3333
self.subsessionCount = 1;
3434
self.sessionLength = 0;
3535
self.timeSpent = 0;

0 commit comments

Comments
 (0)