-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
checkInternetConnectionOnStartup to check internet connection not only with NetInfo #94
checkInternetConnectionOnStartup to check internet connection not only with NetInfo #94
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some flow things related. Other than that, LGTM to be merged
): Promise<boolean> { | ||
let connectionChecked: Promise<boolean>; | ||
if (Platform.OS === 'ios') { | ||
connectionChecked = new Promise(resolve: Function => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a flow
parsing error on the CI, could you please wrap (resolve: Function)
into parenthesis?
I don't know if that's due to an old version (v0.42). Another alternative could be to upgrade flow
to a most recent one.
But probably the easiest is the former
connectionChecked = NetInfo.isConnected.fetch(); | ||
} | ||
|
||
return connectionChecked.then(isConnected: boolean => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same thing here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks very much for this @dickerpulli!
No description provided.