Skip to content

Bangle_setUI_Q3: fix btn back handler was not always rm:ed correctly #2636

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

Merged
merged 2 commits into from
Jun 10, 2025

Conversation

thyttan
Copy link
Contributor

@thyttan thyttan commented May 26, 2025

Using the recent messagegui updates in combination with Fastload Utils exposed a bug with Bangle.setUI where back on hw button watches could end up not cleared after setting up a the UI of the clock after unreadTimeout of messagegui ran out. This seems to fix that, when testing this special case at least. I just finished the changes so have not tested for long.

@gfwilliams please say if we should change something before merge.

When this looks good I can fix the Bangle.js 1 implementation as well.

@gfwilliams
Copy link
Member

Sorry - missed this last week!

@gfwilliams
Copy link
Member

I've just committed some changes - I think we don't need to worry about removing the listener in .remove since the only place we call it is setUI line 11, and we clear the button watches 2 lines later.

It makes the code much tidier - and it's probably something I should have done originally. Does that look good?

If so we can do the same on Bangle.js 1?

@thyttan
Copy link
Contributor Author

thyttan commented Jun 9, 2025

I think that will do :) let's go with that.

I will probably not tweak Bangle 1 setUI until next week. Please go ahead if you want to do it instead!

@gfwilliams gfwilliams marked this pull request as ready for review June 10, 2025 09:19
@gfwilliams gfwilliams merged commit 18fbbe7 into espruino:master Jun 10, 2025
22 checks passed
gfwilliams added a commit that referenced this pull request Jun 10, 2025
@gfwilliams
Copy link
Member

Thanks - just done!

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