mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-04-18 08:43:12 +00:00
MainActivity: Fix onBackPressed handling for open player
The change b9dd7078ad3ae2ac1c20969fdd8b97736026b7dc 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.
This commit is contained in:
parent
407d2d768d
commit
fd99c5e461
@ -569,8 +569,8 @@ public class MainActivity extends AppCompatActivity {
|
||||
if (player instanceof BackPressable backPressable && !backPressable.onBackPressed()) {
|
||||
BottomSheetBehavior.from(mainBinding.fragmentPlayerHolder)
|
||||
.setState(BottomSheetBehavior.STATE_COLLAPSED);
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (fragmentManager.getBackStackEntryCount() == 1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user