-
Notifications
You must be signed in to change notification settings - Fork 750
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 shared StartStopTypedEventHandler for Sensors #19166
Refactor: Use shared StartStopTypedEventHandler for Sensors #19166
Conversation
I also saw that on a lot of sensor classes, the |
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-19166/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-19166/index.html |
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-19166/index.html |
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.
Thank you for your PR, @nickodei! I tested the changes with Android and it seems to be working well. The changes look good to me, any suggestions @MartinZikmund?
Looks good to me! Merging! |
Congrats on your first pull-request! We ❤ the people who are involved in this project, and we’d love to pay it forward by sending you some swag. If you have any feedback (or ideas how to improve Uno as a open-source project) please open a feedback issue. |
That can be done as separate PR - I guess using |
GitHub Issue: closes #19131
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Most sensors used an
TypedEventHandler
field and had duplicated logic on the event handling.What is the new behavior?
Refactoring to use
StartStopTypedEventHandler
that encapsulates the logic for event-handling.This is now used in the sensor classes instead.
PR Checklist
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Run
results.