Skip to content

Commit 21054d3

Browse files
committed
Delete list remove method from notification limit logic
1 parent e569faa commit 21054d3

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

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

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,9 @@ static void markLastNotificationReceived(@Nullable String notificationId) {
9191
// If the attribution window increases, old notifications ids might influence the session
9292
if (notificationsReceived.length() > notificationLimit) {
9393
int lengthDifference = notificationsReceived.length() - notificationLimit;
94-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
95-
for (int i = 0; i < lengthDifference; i++) {
96-
notificationsReceived.remove(i);
97-
}
98-
} else {
99-
notificationsToSave = new JSONArray();
100-
for (int i = lengthDifference; i < notificationsReceived.length(); i++) {
101-
notificationsToSave.put(notificationsReceived.get(i));
102-
}
94+
notificationsToSave = new JSONArray();
95+
for (int i = lengthDifference; i < notificationsReceived.length(); i++) {
96+
notificationsToSave.put(notificationsReceived.get(i));
10397
}
10498
}
10599

0 commit comments

Comments
 (0)