Skip to content

Commit 8e7a758

Browse files
committed
Fix showing old notifications on groupless update
Fix issue where if notifications were shown as heads-up style and a 4th notification is displayed all previous notifications would show again. We need to regenerate these notifications to attach a group but we didn't use setOnlyAlertOnce(true) to prevent showing as heads up again.
1 parent da8c8d8 commit 8e7a758

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

OneSignalSDK/onesignal/src/main/java/com/onesignal/OneSignalNotificationManager.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ static void assignGrouplessNotifications(Context context, ArrayList<StatusBarNot
113113
// Recreate the notification but with the groupless key instead
114114
Notification notif = grouplessNotifBuilder
115115
.setGroup(GROUPLESS_SUMMARY_KEY)
116+
.setOnlyAlertOnce(true)
116117
.build();
117118

118119
NotificationManagerCompat.from(context).notify(grouplessNotif.getId(), notif);

0 commit comments

Comments
 (0)