mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-24 04:24:52 +08:00
[notifications] Add jsInitialised method to improve getInitialNotification
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
* @flow
|
||||
* Notifications representation wrapper
|
||||
*/
|
||||
import { Platform } from 'react-native';
|
||||
import { SharedEventEmitter } from '../../utils/events';
|
||||
import { getLogger } from '../../utils/log';
|
||||
import ModuleBase from '../../utils/ModuleBase';
|
||||
@@ -119,6 +120,11 @@ export default class Notifications extends ModuleBase {
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
// Tell the native module that we're ready to receive events
|
||||
if (Platform.OS === 'ios') {
|
||||
getNativeModule(this).jsInitialised();
|
||||
}
|
||||
}
|
||||
|
||||
get android(): AndroidNotifications {
|
||||
|
||||
Reference in New Issue
Block a user