From cf892a96d693af778679278549fc8fa354326f43 Mon Sep 17 00:00:00 2001 From: Nathan Spaun Date: Tue, 1 Dec 2015 14:17:59 -0800 Subject: [PATCH] Fix NetInfo for Android Reviewed By: oli Differential Revision: D2708102 fb-gh-sync-id: f6a12c49c89c46d31114fefaf3e2b1ba72dabdee --- Libraries/Network/NetInfo.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Libraries/Network/NetInfo.js b/Libraries/Network/NetInfo.js index 6c811f925..41eb9390d 100644 --- a/Libraries/Network/NetInfo.js +++ b/Libraries/Network/NetInfo.js @@ -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);