FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(connectivity): making startMonitoring() behave on iOS as on Andro… · NativeScript/NativeScript@a58fc52 · GitHub

Commit a58fc52

Browse files
authored andcommitted
fix(connectivity): making startMonitoring() behave on iOS as on Android (#6373)
On Android, when calling startMonitor it will immediately fire the callback with the current state. Now it does the same on iOS.
1 parent a211bbd commit a58fc52

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎tns-core-modules/connectivity/connectivity.ios.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ export function startMonitoring(connectionTypeChangedCallback: (newConnectionTyp
7575
_connectionTypeChangedCallback = <any>zonedCallback(connectionTypeChangedCallback);
7676
SCNetworkReachabilitySetCallback(_monitorReachabilityRef, _reachabilityCallbackFunctionRef, null);
7777
SCNetworkReachabilityScheduleWithRunLoop(_monitorReachabilityRef, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
78+
_connectionTypeChangedCallback(_getConnectionType());
7879
}
7980
}
8081

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL