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

MainActivity: Fix onBackPressed handling for open player #11978

Open
wants to merge 1 commit into
base: refactor
Choose a base branch
from

Conversation

Profpatsch
Copy link
Contributor

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

The change
b9dd707
accidentally moved the return into the {}, so the logic would fall
through to

if (fragmentManager.getBackStackEntryCount() == 1) {`

and close the app even though there are still items on the
VideoFragmentDetail stack.

To reproduce:
Start video, enqueue another video, then start a third video (which
adds one entry to the stack), and press back on the expanded video.

This should keep the player open and go back to the first 2-video
queue, but it actually closes the app before this fix.

The change
b9dd707
accidentally moved the `return` into the `{}`, so the logic would fall
through to

```
if (fragmentManager.getBackStackEntryCount() == 1) {`
```

and close the app even though there are still items on the
`VideoFragmentDetail` stack.

To reproduce:
Start video, enqueue another video, then start a third video (which
adds one entry to the stack), and press `back` on the expanded video.

This should keep the player open and go back to the first 2-video
queue, but it actually closes the app before this fix.
@github-actions github-actions bot added the size/small PRs with less than 50 changed lines label Jan 30, 2025
@AudricV AudricV added bug Issue is related to a bug player Issues related to any player (main, popup and background) queue Issue is related to queueing labels Jan 30, 2025
@ShareASmile ShareASmile added the rewrite Issues and PRs related to rewrite label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug player Issues related to any player (main, popup and background) queue Issue is related to queueing rewrite Issues and PRs related to rewrite size/small PRs with less than 50 changed lines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants