forked from Ivasoft/mattermost-mobile
App crash in android sometimes while opening the notifications (#5776)
* Checks for condition before removing the notification * Misc
This commit is contained in:
committed by
GitHub
parent
2a4027f74a
commit
fe12190f4b
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user