[notifications] Add jsInitialised method to improve getInitialNotification

This commit is contained in:
Chris Bianca
2018-03-30 10:31:06 +01:00
parent 06c06b764f
commit 801adabb27
2 changed files with 31 additions and 21 deletions

View File

@@ -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 {