diff --git a/android/app/src/main/java/com/mattermost/rnbeta/CustomPushNotification.java b/android/app/src/main/java/com/mattermost/rnbeta/CustomPushNotification.java index 2bf701de3..14a2b9665 100644 --- a/android/app/src/main/java/com/mattermost/rnbeta/CustomPushNotification.java +++ b/android/app/src/main/java/com/mattermost/rnbeta/CustomPushNotification.java @@ -215,9 +215,12 @@ public class CustomPushNotification extends PushNotification { if (channelId != null) { Map> notificationsInChannel = loadNotificationsMap(mContext); List notifications = notificationsInChannel.get(channelId); + if (notifications == null) { + return; + } notifications.remove(notificationId); saveNotificationsMap(mContext, notificationsInChannel); - clearChannelNotifications(mContext, channelId); + clearChannelNotifications(mContext, channelId); } }