File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed
Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -158,6 +158,7 @@ extern NSString *const kPostflightRulesProcessed;
158158// /
159159// / Are represented in seconds
160160// /
161+ extern const NSUInteger kMinimumFullSyncInterval ;
161162extern const NSUInteger kDefaultFullSyncInterval ;
162163extern const NSUInteger kDefaultPushNotificationsFullSyncInterval ;
163164extern const NSUInteger kDefaultPushNotificationsGlobalRuleSyncDeadline ;
Original file line number Diff line number Diff line change 151151NSString *const kPostflightRulesProcessed = @" rules_processed" ;
152152
153153const NSUInteger kDefaultEventBatchSize = 50 ;
154+ const NSUInteger kMinimumFullSyncInterval = 60 ;
154155const NSUInteger kDefaultFullSyncInterval = 600 ;
155156const NSUInteger kDefaultPushNotificationsFullSyncInterval = 14400 ;
156157const NSUInteger kDefaultPushNotificationsGlobalRuleSyncDeadline = 600 ;
Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ - (BOOL)sync {
182182 uint64_t value = resp.push_notification_full_sync_interval_seconds ()
183183 ?: resp.deprecated_fcm_full_sync_interval_seconds ();
184184 self.syncState .pushNotificationsFullSyncInterval =
185- (value < kDefaultFullSyncInterval ) ? kDefaultPushNotificationsFullSyncInterval : value;
185+ (value < kMinimumFullSyncInterval ) ? kMinimumFullSyncInterval : value;
186186
187187 value = resp.push_notification_global_rule_sync_deadline_seconds ()
188188 ?: resp.deprecated_fcm_global_rule_sync_deadline_seconds ();
@@ -193,7 +193,8 @@ - (BOOL)sync {
193193
194194 // Check if our sync interval has changed
195195 value = resp.full_sync_interval_seconds ();
196- self.syncState .fullSyncInterval = (value < 60 ) ? kDefaultFullSyncInterval : value;
196+ self.syncState .fullSyncInterval =
197+ (value < kMinimumFullSyncInterval ) ? kMinimumFullSyncInterval : value;
197198
198199 switch (resp.client_mode ()) {
199200 case ::pbv1::MONITOR: self.syncState .clientMode = SNTClientModeMonitor; break ;
You can’t perform that action at this time.
0 commit comments