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: trigger onConnected callback on subscribe if already connected #185

Merged
merged 4 commits into from
Jan 9, 2024

Conversation

rolznz
Copy link
Collaborator

@rolznz rolznz commented Jan 8, 2024

Fixes #176

Also deprecates isConnected api function

@rolznz rolznz requested review from bumi and reneaaron January 8, 2024 08:29
@bumi
Copy link
Contributor

bumi commented Jan 9, 2024

what states do we have or might be interesting:

  • isConnected meant that webln is ready and enabled?
  • onConnect is called once enable() is done
  • do we have something to let the app know that a user has done the setup already before (no matter if enable() is finished or not)

@rolznz
Copy link
Collaborator Author

rolznz commented Jan 9, 2024

what states do we have or might be interesting:

  • isConnected meant that webln is ready and enabled?
  • onConnect is called once enable() is done
  • do we have something to let the app know that a user has done the setup already before (no matter if enable() is finished or not)
  • isConnected meant that webln is ready and enabled? - yes, but I decided to deprecate that because it is unreliable based on timing
  • onConnect is called once enable() is done - yes, or when onConnect is called and the enable was already done before onConnect was called
  • do we have something to let the app know that a user has done the setup already before - not yet

@rolznz rolznz merged commit 838a194 into master Jan 9, 2024
2 checks passed
@bumi bumi deleted the fix/on-connected-callback branch January 9, 2024 15:22
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.

onConnected not fired on page load
2 participants