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

Messagelist setUI proper fix #2980

Merged
merged 2 commits into from
Aug 29, 2023

Conversation

rigrig
Copy link
Contributor

@rigrig rigrig commented Aug 18, 2023

new Layout(...) calls Bangle.setUI(), causing uiRemove() to be called whenever a new messages arrives, instead of only when the app exits.
This fixes that by unsetting Bangle.uiRemove before calling Layout, and restoring it afterwards.

Also: add some debug() lines, enabled by setting global.DEBUG_MESSAGELIST = true

(Proper fix instead of #2975)

rigrig added 2 commits August 19, 2023 13:48
Set `global.DEBUG_MESSAGELIST = true` to enable
new Layout(...) calls Bangle.setUI(), causing uiRemove() to be called
whenever a new messages arrives, instead of only when the app exits.

This fixes that by unsetting Bangle.uiRemove before calling Layout, and
restoring it afterwards.
@rigrig rigrig force-pushed the messagelist-setui-better-fix branch from e47cf30 to 4473acd Compare August 19, 2023 11:51
@gfwilliams
Copy link
Member

Thanks!

@gfwilliams gfwilliams merged commit 799428a into espruino:master Aug 29, 2023
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