in src/index.tsx [541:610]
export function removePushCallback() {
if (
_onNotificationListener !== null &&
_onNotificationListener !== undefined
) {
_onNotificationListener.remove();
_onNotificationListener = null;
}
if (
_onNotificationReceivedInAppListener !== null &&
_onNotificationReceivedInAppListener !== undefined
) {
_onNotificationReceivedInAppListener.remove();
_onNotificationReceivedInAppListener = null;
}
if (_onMessageListener !== null && _onMessageListener !== undefined) {
_onMessageListener.remove();
_onMessageListener = null;
}
if (
_onNotificationOpenedListener !== null &&
_onNotificationOpenedListener !== undefined
) {
_onNotificationOpenedListener.remove();
_onNotificationOpenedListener = null;
}
if (
_onNotificationRemovedListener !== null &&
_onNotificationRemovedListener !== undefined
) {
_onNotificationRemovedListener.remove();
_onNotificationRemovedListener = null;
}
if (
_onNotificationClickedWithNoAction !== null &&
_onNotificationClickedWithNoAction !== undefined
) {
_onNotificationClickedWithNoAction.remove();
_onNotificationClickedWithNoAction = null;
}
if (
_onChannelOpenedListener !== null &&
_onChannelOpenedListener !== undefined
) {
_onChannelOpenedListener.remove();
_onChannelOpenedListener = null;
}
if (
_onRegisterDeviceTokenSuccessListener !== null &&
_onRegisterDeviceTokenSuccessListener !== undefined
) {
_onRegisterDeviceTokenSuccessListener.remove();
_onRegisterDeviceTokenSuccessListener = null;
}
if (
_onRegisterDeviceTokenFailedListener !== null &&
_onRegisterDeviceTokenFailedListener !== undefined
) {
_onRegisterDeviceTokenFailedListener.remove();
_onRegisterDeviceTokenFailedListener = null;
}
}