@@ -40,7 +40,7 @@ class InAppManager: NSObject, IterableInternalInAppManagerProtocol {
40
40
applicationStateProvider: ApplicationStateProviderProtocol ,
41
41
notificationCenter: NotificationCenterProtocol ,
42
42
dateProvider: DateProviderProtocol ,
43
- retryInterval : Double ) {
43
+ moveToForegroundSyncInterval : Double ) {
44
44
ITBInfo ( )
45
45
46
46
self . requestHandler = requestHandler
@@ -56,7 +56,7 @@ class InAppManager: NSObject, IterableInternalInAppManagerProtocol {
56
56
self . applicationStateProvider = applicationStateProvider
57
57
self . notificationCenter = notificationCenter
58
58
self . dateProvider = dateProvider
59
- self . retryInterval = retryInterval
59
+ self . moveToForegroundSyncInterval = moveToForegroundSyncInterval
60
60
61
61
super. init ( )
62
62
@@ -391,7 +391,7 @@ class InAppManager: NSObject, IterableInternalInAppManagerProtocol {
391
391
// How long do we have to wait before showing the message
392
392
// > 0 means wait, otherwise we are good to show
393
393
private func getInAppShowingWaitTimeInterval( ) -> TimeInterval {
394
- InAppManager . getWaitTimeInterval ( fromLastTime: lastDismissedTime, currentTime: dateProvider. currentDate, gap: retryInterval )
394
+ InAppManager . getWaitTimeInterval ( fromLastTime: lastDismissedTime, currentTime: dateProvider. currentDate, gap: moveToForegroundSyncInterval )
395
395
}
396
396
397
397
// How long do we have to wait?
@@ -521,7 +521,6 @@ class InAppManager: NSObject, IterableInternalInAppManagerProtocol {
521
521
private let persister : InAppPersistenceProtocol
522
522
private var messagesMap = OrderedDictionary < String , IterableInAppMessage > ( )
523
523
private let dateProvider : DateProviderProtocol
524
- private let retryInterval : TimeInterval // in seconds, if a message is already showing how long to wait?
525
524
private var lastDismissedTime : Date ?
526
525
private var lastDisplayTime : Date ?
527
526
@@ -532,7 +531,7 @@ class InAppManager: NSObject, IterableInternalInAppManagerProtocol {
532
531
533
532
private var syncResult : Pending < Bool , Error > ?
534
533
private var lastSyncTime : Date ?
535
- private let moveToForegroundSyncInterval : Double = 1.0 * 60.0 // don't sync within sixty seconds
534
+ private var moveToForegroundSyncInterval : Double = 1.0 * 60.0 // don't sync within sixty seconds
536
535
private var autoDisplayPaused = false
537
536
}
538
537
@@ -621,13 +620,13 @@ extension InAppManager: InAppDisplayChecker {
621
620
return false
622
621
}
623
622
624
- guard InAppManager . getWaitTimeInterval ( fromLastTime: lastDismissedTime, currentTime: dateProvider. currentDate, gap: retryInterval ) <= 0 else {
625
- ITBInfo ( " can't display within retryInterval window " )
623
+ guard InAppManager . getWaitTimeInterval ( fromLastTime: lastDismissedTime, currentTime: dateProvider. currentDate, gap: moveToForegroundSyncInterval ) <= 0 else {
624
+ ITBInfo ( " can't display within configured In-App display interval window " )
626
625
return false
627
626
}
628
627
629
- guard InAppManager . getWaitTimeInterval ( fromLastTime: lastDisplayTime, currentTime: dateProvider. currentDate, gap: retryInterval ) <= 0 else {
630
- ITBInfo ( " can't display within retryInterval window " )
628
+ guard InAppManager . getWaitTimeInterval ( fromLastTime: lastDisplayTime, currentTime: dateProvider. currentDate, gap: moveToForegroundSyncInterval ) <= 0 else {
629
+ ITBInfo ( " can't display within configured In-App display window " )
631
630
return false
632
631
}
633
632
0 commit comments