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(web): keep app awake after returning from the background #48

Merged
merged 2 commits into from
Aug 12, 2024
Merged

Conversation

sabereen
Copy link
Contributor

@sabereen sabereen commented Aug 4, 2024

Pull request checklist

Please check if your PR fulfills the following requirements:

  • The changes have been tested successfully.

@robingenz
Copy link
Member

What problem does this PR solve?

@sabereen
Copy link
Contributor Author

sabereen commented Aug 5, 2024

Hello.

  1. In SSR compatible projects, we cannot use web-only APIs directly (etc. navigator). So, such projects cannot use this plugin.
  2. On the web, when the app is sent to the background, the WakeLock is released, and after returning to the app, we need to request the WakeLock again.

@robingenz
Copy link
Member

So you are fixing two problems with this PR. Please create two separate PRs for this so that the automatically generated changelog remains clear.

@sabereen sabereen changed the title handle visibility change in web & fix SSR compatibility handle visibility change in web Aug 12, 2024
@sabereen
Copy link
Contributor Author

I reverted the commit related to SSR compatibility, and now this PR only does one thing.

@robingenz
Copy link
Member

Please run "npm run fmt" to format the code.

@sabereen
Copy link
Contributor Author

done

Copy link
Member

@robingenz robingenz left a comment

Choose a reason for hiding this comment

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

Thank you!

@robingenz robingenz changed the title handle visibility change in web fix(web): keep app awake after returning from the background Aug 12, 2024
@robingenz robingenz merged commit 39b6e0c into capacitor-community:master Aug 12, 2024
2 checks passed
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