Skip to content

Commit

Permalink
Add missing break statements to remote notification listener.
Browse files Browse the repository at this point in the history
Fixes multiple delivery of notifications and lets us tell the difference between different states.
  • Loading branch information
jclough96 authored Apr 16, 2019
1 parent 498dd34 commit b3d45e8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions RNNotifications/RNNotifications.m
Original file line number Diff line number Diff line change
Expand Up @@ -300,12 +300,13 @@ -(void) handleReceiveNotification:(UIApplicationState)state userInfo:(NSDictiona
{
case (int)UIApplicationStateActive:
[self checkAndSendEvent:RNNotificationReceivedForeground body:userInfo];

break;
case (int)UIApplicationStateInactive:
[self checkAndSendEvent:RNNotificationOpened body:userInfo];

break;
default:
[self checkAndSendEvent:RNNotificationReceivedBackground body:userInfo];
break;
}
}

Expand Down

0 comments on commit b3d45e8

Please sign in to comment.