File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,6 @@ open class OSModelStore<TModel: OSModel>: NSObject {
8787 }
8888
8989 public func add( id: String , model: TModel , hydrating: Bool ) {
90- OneSignalLog . onesignalLog ( . LL_VERBOSE, message: " OSModelStore add() called with model \( model) " )
9190 // TODO: Check if we are adding the same model? Do we replace?
9291 // For example, calling addEmail multiple times with the same email
9392 // Check API endpoint for behavior
@@ -127,6 +126,8 @@ open class OSModelStore<TModel: OSModel>: NSObject {
127126 self . changeSubscription. fire { modelStoreListener in
128127 modelStoreListener. onRemoved ( model)
129128 }
129+ } else {
130+ OneSignalLog . onesignalLog ( . LL_ERROR, message: " OSModelStore cannot remove \( id) because it doesn't exist in the store. " )
130131 }
131132 }
132133
@@ -151,8 +152,6 @@ open class OSModelStore<TModel: OSModel>: NSObject {
151152
152153extension OSModelStore : OSModelChangedHandler {
153154 public func onModelUpdated( args: OSModelChangedArgs , hydrating: Bool ) {
154- OneSignalLog . onesignalLog ( . LL_VERBOSE, message: " OSModelStore.onChanged() called with OSModelChangedArgs: \( args) " )
155-
156155 // persist the changed models to storage
157156 OneSignalUserDefaults . initShared ( ) . saveCodeableData ( forKey: self . storeKey, withValue: self . models)
158157
Original file line number Diff line number Diff line change @@ -52,7 +52,6 @@ extension OSModelStoreListener {
5252 }
5353
5454 public func onAdded( _ model: OSModel ) {
55- OneSignalLog . onesignalLog ( . LL_VERBOSE, message: " OSModelStoreListener.onAdded() with model \( model) " )
5655 guard let addedModel = model as? Self . TModel else {
5756 // log error
5857 return
@@ -63,7 +62,6 @@ extension OSModelStoreListener {
6362 }
6463
6564 public func onUpdated( _ args: OSModelChangedArgs ) {
66- OneSignalLog . onesignalLog ( . LL_VERBOSE, message: " OSModelStoreListener.onUpdated() with args \( args) " )
6765 if let delta = getUpdateModelDelta ( args) {
6866 OSOperationRepo . sharedInstance. enqueueDelta ( delta)
6967 }
Original file line number Diff line number Diff line change @@ -45,6 +45,9 @@ - (void)beginBackgroundTask:(NSString * _Nonnull)taskIdentifier {
4545 message: [NSString stringWithFormat:
4646 @" OSBackgroundTaskManagerImpl:beginBackgroundTask: %@ " , taskIdentifier]];
4747 UIBackgroundTaskIdentifier uiIdentifier = [UIApplication.sharedApplication beginBackgroundTaskWithExpirationHandler: ^{
48+ [OneSignalLog onesignalLog: ONE_S_LL_DEBUG
49+ message: [NSString stringWithFormat:
50+ @" OSBackgroundTaskManagerImpl: expirationHandler called for %@ " , taskIdentifier]];
4851 [self endBackgroundTask: taskIdentifier];
4952 }];
5053 tasks[taskIdentifier] = [NSNumber numberWithUnsignedLong: uiIdentifier];
You can’t perform that action at this time.
0 commit comments