Слушатель Firebase не удаляет - PullRequest
0 голосов
/ 05 сентября 2018
this.notificationOpenedListener = firebase.notifications().onNotificationOpened((notificationOpen) => {
if (notificationOpen) {
    const notification: Notification = notificationOpen.notification;
    if(notification.data.type){
        firebase.notifications().removeAllDeliveredNotifications()
    }
}
});
console.log('notificationOpenedListener', this.notificationOpenedListener());

this.notificationOpenedListener () - >> это не определено

Кто-нибудь имеет представление, почему оно не определено?

Следующий пример: https://rnfirebase.io/docs/v4.3.x/notifications/receiving-notifications#4)-Listen-for-a-Notification-being-opened

...