From 68f5e734d8cadbd001aa6f0537f916e0874c19d8 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Tue, 8 Dec 2020 14:49:47 -0500 Subject: [PATCH 1/2] keep alive on all user touches --- MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.m | 1 - 1 file changed, 1 deletion(-) diff --git a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.m b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.m index 54e6f20..966700a 100644 --- a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.m +++ b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.m @@ -149,7 +149,6 @@ if (!requestForMissingData) { // We have all the needed data, continue with the load. - [[MVMCoreSessionTimeHandler sharedSessionHandler] sendKeepAliveToServer:NO]; [MVMCoreLoadRequestOperation handleLoadObject:loadObject error:nil]; } else { From e1ecf38ce9fdc3d0dbafa554b7b5b27d72beadb3 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Mon, 14 Dec 2020 14:35:37 -0500 Subject: [PATCH 2/2] check before keep alive. --- MVMCore/MVMCore/Session/MVMCoreSessionTimeHandler.h | 6 ++++++ MVMCore/MVMCore/Session/MVMCoreSessionTimeHandler.m | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/MVMCore/MVMCore/Session/MVMCoreSessionTimeHandler.h b/MVMCore/MVMCore/Session/MVMCoreSessionTimeHandler.h index bcc06db..d31ae62 100644 --- a/MVMCore/MVMCore/Session/MVMCoreSessionTimeHandler.h +++ b/MVMCore/MVMCore/Session/MVMCoreSessionTimeHandler.h @@ -16,6 +16,12 @@ // The time that we started the last session timer. @property (assign, nonatomic, readonly) NSTimeInterval timeTimerStarted; +// Keeps track of if the session is currently being timed. Used for entering from the background. +@property (assign, nonatomic, readonly) BOOL sessionBeingTimed; + +// Keeps track of if the session has already timed out. +@property (assign, nonatomic, readonly) BOOL sessionTimedOut; + #pragma mark - functions to override // Can override to provide a time until the warning shows in seconds. Set to 0 if there should be no warning. Default is 0 diff --git a/MVMCore/MVMCore/Session/MVMCoreSessionTimeHandler.m b/MVMCore/MVMCore/Session/MVMCoreSessionTimeHandler.m index d297d72..0a81b45 100644 --- a/MVMCore/MVMCore/Session/MVMCoreSessionTimeHandler.m +++ b/MVMCore/MVMCore/Session/MVMCoreSessionTimeHandler.m @@ -27,10 +27,10 @@ @property (assign, nonatomic, readwrite) NSTimeInterval timeTimerStarted; // Keeps track of if the session is currently being timed. Used for entering from the background. -@property (assign, nonatomic) BOOL sessionBeingTimed; +@property (assign, nonatomic, readwrite) BOOL sessionBeingTimed; // Keeps track of if the session has already timed out. -@property (assign, nonatomic) BOOL sessionTimedOut; +@property (assign, nonatomic, readwrite) BOOL sessionTimedOut; @property (assign, nonatomic) NSTimeInterval secondsUntilWarning; @property (assign, nonatomic) NSTimeInterval secondsUntilTimeout;