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