-
Notifications
You must be signed in to change notification settings - Fork 639
feat: Add onActive and onInactive lifecycle hooks
#3542
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
Conversation
| * | ||
| * @param active - A boolean indicating whether the client is active or not. | ||
| */ | ||
| setActive(active: 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.
This seems to be the easiest solution given that at least the extension doesn't seem to emit any events when the active status changes. I'm open to other suggestions though.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3542 +/- ##
=======================================
Coverage 98.26% 98.26%
=======================================
Files 411 411
Lines 11624 11637 +13
Branches 1810 1814 +4
=======================================
+ Hits 11422 11435 +13
Misses 202 202 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: Guillaume Roux <[email protected]>
Co-authored-by: Guillaume Roux <[email protected]>
This adds support for the
onActiveandonInactivelifecycle hooks. It's accomplished by exposing a newsetActiveaction in the Snap controller, which should be called by the clients when the active status changes.Related to #3541.