Fix NetInfo for Android

Reviewed By: oli

Differential Revision: D2708102

fb-gh-sync-id: f6a12c49c89c46d31114fefaf3e2b1ba72dabdee
This commit is contained in:
Nathan Spaun 2015-12-01 14:17:59 -08:00 committed by facebook-github-bot-8
parent b828ae4200
commit cf892a96d6
1 changed files with 2 additions and 2 deletions

View File

@ -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);