mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Updates from Mon 16 Mar
- [ReactNative] Share same server port for debugger proxy | Alex Kotliarskyi - [react-packager] small fixes to image loader | Amjad Masad - [ReactNative] NetworkInformation.reachability API w/ example | Eric Vicenti - [ReactNative] Put launchOptions in RCTPushNotificationManager | Andrew Rasmussen - [ReactNative] Improve PixelRatio documentation | Christopher Chedeau
This commit is contained in:
@@ -25,22 +25,4 @@ var AppState = {
|
||||
|
||||
};
|
||||
|
||||
// This check avoids redboxing if native RKReachability library isn't included in app
|
||||
// TODO: Move reachability API into separate JS module to prevent need for this
|
||||
if (RKReachability) {
|
||||
AppState.networkReachability = new Subscribable(
|
||||
RCTDeviceEventEmitter,
|
||||
'reachabilityDidChange',
|
||||
(resp) => resp.network_reachability,
|
||||
RKReachability.getCurrentReachability
|
||||
);
|
||||
}
|
||||
|
||||
AppState.NetworkReachability = keyMirror({
|
||||
wifi: true,
|
||||
cell: true,
|
||||
none: true,
|
||||
unknown: true,
|
||||
});
|
||||
|
||||
module.exports = AppState;
|
||||
|
||||
Reference in New Issue
Block a user