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

fix(connectivity): making startMonitoring() behave on iOS as on Android by surdu · Pull Request #6373 · NativeScript/NativeScript · GitHub

fix(connectivity): making startMonitoring() behave on iOS as on Android - #6373

Merged
vakrilov merged 6 commits into
NativeScript:masterfrom
surdu:uniform-connect
Oct 22, 2018
Merged

vakrilov merged 6 commits into
NativeScript:masterfrom
surdu:uniform-connect

Conversation

surdu commented Oct 8, 2018

Copy link
Copy Markdown
Contributor

On Android, when calling startMonitor it will immediately fire the callback with the current state. Now it does the same on iOS.

PR Checklist

What is the current behavior?

When calling connectivity. startMonitoring() on Android, the callback will fire immediately with the current state. This behaviour is not present on iOS.

What is the new behavior?

Calling connectivity. startMonitoring() on iOS will also fire the callback immediately with the current state.

Fixes #4579 .

Please note that I didn't write any tests for this as I didn't know how to. The tests for this component seem just a stub for documentation purpose. If anyone can please point me in the right direction with the tests, I'll gladly write them.

Also didn't manage to test with my own app, as I'm blocked by #6372 😢

On Android, when calling startMonitor it will immediately fire the callback with the current state. Now it does the same on iOS.
ghost added the ♥ community PR label Oct 8, 2018
ns-bot added the cla: yes label Oct 8, 2018
ghost assigned vakrilov Oct 17, 2018
ghost added in progress and removed ♥ community PR labels Oct 17, 2018

surdu commented Oct 17, 2018
edited
Loading

Copy link
Copy Markdown
Contributor Author

Ok, so now that I have a workaround to test tns-core-modules inside my test app, I can confirm that the code works as expected.

Regarding the tests, connectivity events can't be tested on emulators, so probably that's why there are no tests for this component.

Copy link
Copy Markdown
Contributor

test

vakrilov merged commit a58fc52 into NativeScript:master Oct 22, 2018
surdu deleted the uniform-connect branch October 22, 2018 21:07
ghost removed the in progress label Oct 22, 2018

surdu commented Nov 26, 2018

Copy link
Copy Markdown
Contributor Author

Any idea in what version of NS will this be released? It will be a nice addition to simplify a little the code in our projects 😅

lock Bot commented Nov 26, 2019

Copy link
Copy Markdown

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock Bot locked and limited conversation to collaborators Nov 26, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Connectivity's startMonitoring behaviour is different between platforms

4 participants


Back | FazBrowse Home | New Git URL