App crash in android sometimes while opening the notifications (#5776)
* Checks for condition before removing the notification * Misc
This commit is contained in:
parent
2a4027f74a
commit
fe12190f4b
1 changed files with 4 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue