Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
clearChannelNotifications(channelId) {
NotificationsIOS.getDeliveredNotifications((notifications) => {
const ids = [];
let badgeCount = notifications.length;
if (this.reduxStore) {
const totalMentions = getBadgeCount(this.reduxStore.getState());
if (totalMentions > -1) {
badgeCount = totalMentions;
}
}
for (let i = 0; i < notifications.length; i++) {
const notification = notifications[i];
if (notification.channel_id === channelId) {
ids.push(notification.identifier);
}
getDeliveredNotifications(callback) {
NotificationsIOS.getDeliveredNotifications(callback);
}