[invites] Add jsInitialised method to improve getInitialInvitation

This commit is contained in:
Chris Bianca
2018-03-30 10:07:23 +01:00
parent e7be3cc7f8
commit 06c06b764f
3 changed files with 37 additions and 7 deletions

View File

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