Android Send Notification event to JS only once when the app is in the foreground (#5620)
This commit is contained in:
parent
faa3ee05ba
commit
8953f29623
1 changed files with 2 additions and 3 deletions
|
|
@ -119,8 +119,9 @@ public class CustomPushNotification extends PushNotification {
|
|||
switch (type) {
|
||||
case PUSH_TYPE_MESSAGE:
|
||||
case PUSH_TYPE_SESSION:
|
||||
boolean createSummary = type.equals(PUSH_TYPE_MESSAGE);
|
||||
if (!mAppLifecycleFacade.isAppVisible()) {
|
||||
boolean createSummary = type.equals(PUSH_TYPE_MESSAGE);
|
||||
|
||||
if (type.equals(PUSH_TYPE_MESSAGE)) {
|
||||
if (channelId != null) {
|
||||
Map<String, List<Integer>> notificationsInChannel = loadNotificationsMap(mContext);
|
||||
|
|
@ -145,8 +146,6 @@ public class CustomPushNotification extends PushNotification {
|
|||
}
|
||||
|
||||
buildNotification(notificationId, createSummary);
|
||||
} else {
|
||||
notifyReceivedToJS();
|
||||
}
|
||||
break;
|
||||
case PUSH_TYPE_CLEAR:
|
||||
|
|
|
|||
Loading…
Reference in a new issue