[messaging] Return function to remove listeners for onTokenRefresh and onMessage
This commit is contained in:
parent
5795e08f2c
commit
96d122f943
|
@ -217,7 +217,7 @@ export default class Messaging extends Base {
|
|||
data.finish();
|
||||
}
|
||||
}
|
||||
);
|
||||
).remove;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -226,7 +226,7 @@ export default class Messaging extends Base {
|
|||
* @returns {*}
|
||||
*/
|
||||
onTokenRefresh(listener: Function) {
|
||||
return FirebaseMessagingEvt.addListener(EVENT_TYPE.RefreshToken, listener);
|
||||
return FirebaseMessagingEvt.addListener(EVENT_TYPE.RefreshToken, listener).remove;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue