• Doron Pearl's avatar
    fix background PN is received as foreground · aa7625ce
    Doron Pearl authored
    for the first time. refs #268 
    The `didReceiveRemoteNotification` checks for the current app state which will be active and hence wrongly emit the notification to JS as foreground. However at the exact time when the user opened the notification, the app was at the background hence this is a background notification by definition.
    
    In other words, conceptually determining if the notification is background or foreground should NOT be based on the time it was consumed from the queue but on the time it was received. Practically, if it was queued, then the app must have been in the background ==> background notification.
    aa7625ce
RNNotifications.m 29.6 KB