@@ -30,13 +30,13 @@ import OneSignalCore
3030
3131class OSSubscriptionOperationExecutor : OSOperationExecutor {
3232 var supportedDeltas : [ String ] = [ OS_ADD_SUBSCRIPTION_DELTA, OS_REMOVE_SUBSCRIPTION_DELTA, OS_UPDATE_SUBSCRIPTION_DELTA]
33- var deltaQueue : [ OSDelta ] = [ ]
33+ private var deltaQueue : [ OSDelta ] = [ ]
3434 // To simplify uncaching, we maintain separate request queues for each type
35- var addRequestQueue : [ OSRequestCreateSubscription ] = [ ]
36- var removeRequestQueue : [ OSRequestDeleteSubscription ] = [ ]
37- var updateRequestQueue : [ OSRequestUpdateSubscription ] = [ ]
38- var subscriptionModels : [ String : OSSubscriptionModel ] = [ : ]
39- let newRecordsState : OSNewRecordsState
35+ private var addRequestQueue : [ OSRequestCreateSubscription ] = [ ]
36+ private var removeRequestQueue : [ OSRequestDeleteSubscription ] = [ ]
37+ private var updateRequestQueue : [ OSRequestUpdateSubscription ] = [ ]
38+ private var subscriptionModels : [ String : OSSubscriptionModel ] = [ : ]
39+ private let newRecordsState : OSNewRecordsState
4040
4141 // The Subscription executor dispatch queue, serial. This synchronizes access to the delta and request queues.
4242 private let dispatchQueue = DispatchQueue ( label: " OneSignal.OSSubscriptionOperationExecutor " , target: . global( ) )
@@ -157,7 +157,7 @@ class OSSubscriptionOperationExecutor: OSOperationExecutor {
157157 /**
158158 Since there are 2 subscription stores, we need to check both stores for the model with a particular `modelId`.
159159 */
160- func getSubscriptionModelFromStores( modelId: String ) -> OSSubscriptionModel ? {
160+ private func getSubscriptionModelFromStores( modelId: String ) -> OSSubscriptionModel ? {
161161 if let modelInStore = OneSignalUserManagerImpl . sharedInstance. pushSubscriptionModelStore. getModel ( modelId: modelId) {
162162 return modelInStore
163163 }
@@ -246,7 +246,7 @@ class OSSubscriptionOperationExecutor: OSOperationExecutor {
246246 }
247247
248248 /// This method is called by `processDeltaQueue` only and does not need to be added to the dispatchQueue.
249- func processRequestQueue( inBackground: Bool ) {
249+ private func processRequestQueue( inBackground: Bool ) {
250250 let requestQueue : [ OneSignalRequest ] = addRequestQueue + removeRequestQueue + updateRequestQueue
251251
252252 if requestQueue. isEmpty {
@@ -269,7 +269,7 @@ class OSSubscriptionOperationExecutor: OSOperationExecutor {
269269 }
270270 }
271271
272- func executeCreateSubscriptionRequest( _ request: OSRequestCreateSubscription , inBackground: Bool ) {
272+ private func executeCreateSubscriptionRequest( _ request: OSRequestCreateSubscription , inBackground: Bool ) {
273273 guard !request. sentToClient else {
274274 return
275275 }
@@ -391,7 +391,7 @@ class OSSubscriptionOperationExecutor: OSOperationExecutor {
391391 }
392392 }
393393
394- func executeUpdateSubscriptionRequest( _ request: OSRequestUpdateSubscription , inBackground: Bool ) {
394+ private func executeUpdateSubscriptionRequest( _ request: OSRequestUpdateSubscription , inBackground: Bool ) {
395395 guard !request. sentToClient else {
396396 return
397397 }
0 commit comments