[messaging] Return function to remove listeners for onTokenRefresh and onMessage

This commit is contained in:
Chris Bianca 2017-06-19 09:21:15 +01:00
parent 5795e08f2c
commit 96d122f943
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}
/**