Fix NetInfo for Android
Reviewed By: oli Differential Revision: D2708102 fb-gh-sync-id: f6a12c49c89c46d31114fefaf3e2b1ba72dabdee
This commit is contained in:
parent
b828ae4200
commit
cf892a96d6
|
@ -17,7 +17,7 @@ var Platform = require('Platform');
|
|||
var RCTDeviceEventEmitter = require('RCTDeviceEventEmitter');
|
||||
var RCTNetInfo = NativeModules.NetInfo;
|
||||
|
||||
var DEVICE_REACHABILITY_EVENT = 'networkDidChange';
|
||||
var DEVICE_REACHABILITY_EVENT = 'reachabilityDidChange';
|
||||
|
||||
type ChangeEventName = $Enum<{
|
||||
change: string;
|
||||
|
@ -163,7 +163,7 @@ var NetInfo = {
|
|||
var listener = RCTDeviceEventEmitter.addListener(
|
||||
DEVICE_REACHABILITY_EVENT,
|
||||
(appStateData) => {
|
||||
handler(appStateData.network_info);
|
||||
handler(appStateData.network_reachability);
|
||||
}
|
||||
);
|
||||
_subscriptions.set(handler, listener);
|
||||
|
|
Loading…
Reference in New Issue