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 event name for state change #184

Merged
merged 2 commits into from
Jan 16, 2023
Merged

Fix event name for state change #184

merged 2 commits into from
Jan 16, 2023

Conversation

Stmu
Copy link
Contributor

@Stmu Stmu commented Nov 18, 2022

Fix a typo for the event name "state-changed"

Fix a typo for the event name "state-changed"
Hide "false" string in the dialog when showClose is false at rendermessage
@@ -179,7 +179,7 @@ export class ImprovBluetoothLE extends EventTarget {
const state = encodedState.getUint8(0) as ImprovCurrentState;
this.logger.debug("improv current state", state);
this.currentState = state;
this.dispatchEvent(new CustomEvent("state-change"));
this.dispatchEvent(new CustomEvent("state-changed"));
Copy link
Contributor

Choose a reason for hiding this comment

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

We shouldn't fix the typo as that's a breaking change. It's been there and so that's it. Instead we should fix the readme.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi, I think this is not just a typo. The modal dialog ('Press the authorize button on the device') waits endless after the charackteristic state is changed (e.g. state '1' to '2').
The dialog is advised to a "state-changed") but this event will never raised.

Copy link
Contributor

Choose a reason for hiding this comment

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

Then let's fix the event listener. That way we can avoid a breaking change.

Choose a reason for hiding this comment

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

@balloob The event is referred to as state-changed when dispatched on line 140. One of them realistically has to change.

@balloob balloob merged commit a7f59ca into improv-wifi:main Jan 16, 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.

None yet

3 participants