Skip to content
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

refactor: use only one source of online events #1046

Merged
merged 1 commit into from
Dec 8, 2023

Conversation

acezard
Copy link
Contributor

@acezard acezard commented Dec 4, 2023

  • Remove direct NetInfo use in NetStatusBoundary (use service instead)
  • Add more error handling
  • Use hidesplashscreen inside error screen instead of provider
  • Refactor waitForOnline to accept callback as function
  • Add some comments to clarify flow

All this should clear up conflicting authority issues on online events
NetStatusBoundary handles app mount with the help of NetService.
NetService remains react agnostic collection of functions to be used
by various components inside the application.
Possible improvements would be to have NetStatusBoundary act as runtime
manager of online events instead of having components using netservice
directly. That would require a lot more refactor though and it is not
clear at the moment if it would bring a huge benefit.

- Remove direct NetInfo use in NetStatusBoundary (use service instead)
- Add more error handling
- Use hidesplashscreen inside error screen instead of provider
- Refactor waitForOnline to accept callback as function

All this should clear up conflicting authority issues on online events
NetStatusBoundary handles app mount with the help of NetService.
NetService remains react agnostic collection of functions to be used
by various components inside the application.
Possible improvements would be to have NetStatusBoundary act as runtime
manager of online events instead of having components using netservice
directly. That would require a lot more refactor though and it is not
clear at the moment if it would bring a huge benefit.
@acezard acezard force-pushed the refactor--use-only-one-source-of-online-events branch from c44d2c5 to 296bcb0 Compare December 4, 2023 14:37
@acezard acezard merged commit 19a0a7e into master Dec 8, 2023
1 check passed
@acezard acezard deleted the refactor--use-only-one-source-of-online-events branch December 8, 2023 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants