Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
componentWillUnmount() {
JPushModule.removeReceiveCustomMsgListener(receiveCustomMsgEvent);
JPushModule.removeReceiveNotificationListener(receiveNotificationEvent);
JPushModule.removeReceiveOpenNotificationListener(openNotificationEvent);
JPushModule.removeGetRegistrationIdListener(getRegistrationIdEvent);
console.log("Will clear all notifications");
JPushModule.clearAllNotifications();
}
componentWillUnmount() {
!!this.onBackPress && BackHandler.removeEventListener('hardwareBackPress', this.onBackPress);
this.lastBackPressed = null;
JPushModule.removeReceiveCustomMsgListener();
JPushModule.removeReceiveNotificationListener();
JPushModule.removeReceiveOpenNotificationListener();
JPushModule.clearAllNotifications();
}
componentWillUnmount() {
JPushModule.removeReceiveCustomMsgListener(receiveCustomMsgEvent);
JPushModule.removeReceiveNotificationListener(receiveNotificationEvent);
}
componentWillUnmount() {
JPushModule.removeReceiveCustomMsgListener();
JPushModule.removeReceiveNotificationListener();
}