@@ -30,13 +30,13 @@ import OneSignalCore
30
30
31
31
class OSSubscriptionOperationExecutor : OSOperationExecutor {
32
32
var supportedDeltas : [ String ] = [ OS_ADD_SUBSCRIPTION_DELTA, OS_REMOVE_SUBSCRIPTION_DELTA, OS_UPDATE_SUBSCRIPTION_DELTA]
33
- var deltaQueue : [ OSDelta ] = [ ]
33
+ private var deltaQueue : [ OSDelta ] = [ ]
34
34
// 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
40
40
41
41
// The Subscription executor dispatch queue, serial. This synchronizes access to the delta and request queues.
42
42
private let dispatchQueue = DispatchQueue ( label: " OneSignal.OSSubscriptionOperationExecutor " , target: . global( ) )
@@ -157,7 +157,7 @@ class OSSubscriptionOperationExecutor: OSOperationExecutor {
157
157
/**
158
158
Since there are 2 subscription stores, we need to check both stores for the model with a particular `modelId`.
159
159
*/
160
- func getSubscriptionModelFromStores( modelId: String ) -> OSSubscriptionModel ? {
160
+ private func getSubscriptionModelFromStores( modelId: String ) -> OSSubscriptionModel ? {
161
161
if let modelInStore = OneSignalUserManagerImpl . sharedInstance. pushSubscriptionModelStore. getModel ( modelId: modelId) {
162
162
return modelInStore
163
163
}
@@ -246,7 +246,7 @@ class OSSubscriptionOperationExecutor: OSOperationExecutor {
246
246
}
247
247
248
248
/// 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 ) {
250
250
let requestQueue : [ OneSignalRequest ] = addRequestQueue + removeRequestQueue + updateRequestQueue
251
251
252
252
if requestQueue. isEmpty {
@@ -269,7 +269,7 @@ class OSSubscriptionOperationExecutor: OSOperationExecutor {
269
269
}
270
270
}
271
271
272
- func executeCreateSubscriptionRequest( _ request: OSRequestCreateSubscription , inBackground: Bool ) {
272
+ private func executeCreateSubscriptionRequest( _ request: OSRequestCreateSubscription , inBackground: Bool ) {
273
273
guard !request. sentToClient else {
274
274
return
275
275
}
@@ -391,7 +391,7 @@ class OSSubscriptionOperationExecutor: OSOperationExecutor {
391
391
}
392
392
}
393
393
394
- func executeUpdateSubscriptionRequest( _ request: OSRequestUpdateSubscription , inBackground: Bool ) {
394
+ private func executeUpdateSubscriptionRequest( _ request: OSRequestUpdateSubscription , inBackground: Bool ) {
395
395
guard !request. sentToClient else {
396
396
return
397
397
}
0 commit comments