File tree Expand file tree Collapse file tree 4 files changed +9
-5
lines changed Expand file tree Collapse file tree 4 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 6060+ (UILocalNotification*)prepareUILocalNotification : (NSDictionary *)data : (NSDictionary *)userInfo ;
6161+ (BOOL )verifyURL : (NSString *)urlString ;
6262+ (BOOL )isRemoteSilentNotification : (NSDictionary *)msg ;
63- @property (class ) NSString *lastMessageIdFromAction;
6463
6564// - Networking
6665+ (NSNumber *)getNetType ;
Original file line number Diff line number Diff line change @@ -293,6 +293,11 @@ - (NSString*)stringify {
293293
294294@implementation OneSignalHelper
295295
296+ + (void ) resetLocals {
297+ [OneSignalHelper lastMessageReceived: nil ];
298+ _lastMessageIdFromAction = nil ;
299+ }
300+
296301UIBackgroundTaskIdentifier mediaBackgroundTask;
297302
298303+ (void ) beginBackgroundMediaTask {
@@ -505,7 +510,6 @@ + (void)handleNotificationReceived:(OSNotificationDisplayType)displayType {
505510}
506511
507512static NSString *_lastMessageIdFromAction;
508- + (void )setLastMessageIdFromAction : (NSString *)value { _lastMessageIdFromAction = value; }
509513
510514+ (void )handleNotificationAction : (OSNotificationActionType)actionType actionID : (NSString *)actionID displayType : (OSNotificationDisplayType)displayType {
511515 if (!handleNotificationAction || ![self isOneSignalPayload ])
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ @implementation OneSignalTracker
5151
5252+ (void )resetLocals {
5353 unSentActiveTime = nil ;
54- focusBackgroundTask = nil ;
54+ focusBackgroundTask = 0 ;
5555 lastOpenedTime = 0 ;
5656 lastOnFocusWasToBackground = YES ;
5757}
Original file line number Diff line number Diff line change @@ -437,8 +437,9 @@ - (void)setUp {
437437
438438 preferredLanguagesArray = @[@" en-US" ];
439439
440- [OneSignalHelper lastMessageReceived: nil ];
441- OneSignalHelper.lastMessageIdFromAction = nil ;
440+ [OneSignalHelper performSelector: NSSelectorFromString (@" resetLocals" )];
441+
442+
442443 [OneSignal setValue: nil forKeyPath: @" lastAppActiveMessageId" ];
443444 [OneSignal setValue: nil forKeyPath: @" lastnonActiveMessageId" ];
444445 [OneSignal setValue: @0 forKeyPath: @" mSubscriptionStatus" ];
You can’t perform that action at this time.
0 commit comments