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: Set inForeground to true after a new session has been started #124

Merged
merged 4 commits into from
Mar 4, 2024

Conversation

izaaz
Copy link
Collaborator

@izaaz izaaz commented Feb 26, 2024

Summary

There's an edge case where we set the inForeground property to true before extending the session. If an event is triggered between this and the start session creating a new session, an old session can get extended.

Fixing this by only setting the inForeground property to true after a new session has been created if needed

Checklist

  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?:

@izaaz izaaz changed the title bug: Set inForeground to true after a new session has been started if needed bug: Set inForeground to true after a new session has been started Feb 27, 2024
@izaaz izaaz changed the title bug: Set inForeground to true after a new session has been started fix: Set inForeground to true after a new session has been started Feb 27, 2024
Copy link
Contributor

@justin-fiedler justin-fiedler left a comment

Choose a reason for hiding this comment

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

I think this should be ok. Is it possible to add a corresponding test?

@justin-fiedler justin-fiedler self-requested a review March 4, 2024 21:59
Copy link
Contributor

@justin-fiedler justin-fiedler left a comment

Choose a reason for hiding this comment

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

Thanks for the test!

@izaaz izaaz merged commit 3780c44 into main Mar 4, 2024
3 checks passed
@izaaz izaaz deleted the AMP-93779/fix_long_sessions branch March 4, 2024 22:54
github-actions bot pushed a commit that referenced this pull request Mar 5, 2024
## [1.3.6](v1.3.5...v1.3.6) (2024-03-05)

### Bug Fixes

* Set inForeground to true after a new session has been started ([#124](#124)) ([3780c44](3780c44))
Copy link

github-actions bot commented Mar 5, 2024

🎉 This PR is included in version 1.3.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants