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

fix(observer): check if observer is associated with job on remove fn #7727

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

AndreCostaaa
Copy link
Contributor

Like discussed here: #7651 (comment)

This allows the user to call lv_observer_remove even if the observer is associated with a job by simply detaching its event callbacks from the object

@vwheeler63

Copy link
Contributor

@vwheeler63 vwheeler63 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks beautiful to me, though you might need to tweak the test a little to confirm that deleting the Widget does not call unsubscribe_on_delete_cb().

tests/src/test_cases/test_observer.c Outdated Show resolved Hide resolved
src/others/observer/lv_observer.c Show resolved Hide resolved
@FASTSHIFT FASTSHIFT changed the title fix: check if observer is associated with job on remove fn fix(observer): check if observer is associated with job on remove fn Feb 7, 2025
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.

3 participants