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

await SafeArea.enable() get stucked #14

Closed
cyrilfr opened this issue Jun 6, 2024 · 2 comments · Fixed by #15
Closed

await SafeArea.enable() get stucked #14

cyrilfr opened this issue Jun 6, 2024 · 2 comments · Fixed by #15

Comments

@cyrilfr
Copy link

cyrilfr commented Jun 6, 2024

I use SafeArea to set the status bar and nav bar style and manage the insets with the injected CSS variables. This is a great plugin but when I call await SafeArea.enable() more than once (ex: to change the app theme according to the one selected by the user), it gets stuck. The code that should be run after this call in the function is not.

For now I call it without await as a workaround but this is far from being perfect.

@tafelnl
Copy link
Member

tafelnl commented Jun 6, 2024

This issue existed because call.resolve() was not being called by the plugin method. This is now resolved in the latest version (v6.0.0-alpha.4)

For now I call it without await as a workaround but this is far from being perfect.

I'm not sure though what you mean by this. Why is that "far from being perfect"? There's nothing to await for. No data is being returned anyways. So it shouldn't really matter when omitting await. Why do you think otherwise?

@cyrilfr
Copy link
Author

cyrilfr commented Jun 6, 2024

This is because it returns a Promise. It's better to use await in an async function.

Thanks for your reactivity :)

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 a pull request may close this issue.

2 participants