App crash in android sometimes while opening the notifications (#5776)

* Checks for condition before removing the notification

* Misc
This commit is contained in:
Anurag Shivarathri
2021-10-24 23:10:28 +05:30
committed by GitHub
parent 2a4027f74a
commit fe12190f4b

View File

@@ -215,9 +215,12 @@ public class CustomPushNotification extends PushNotification {
if (channelId != null) {
Map<String, List<Integer>> notificationsInChannel = loadNotificationsMap(mContext);
List<Integer> notifications = notificationsInChannel.get(channelId);
if (notifications == null) {
return;
}
notifications.remove(notificationId);
saveNotificationsMap(mContext, notificationsInChannel);
clearChannelNotifications(mContext, channelId);
clearChannelNotifications(mContext, channelId);
}
}