mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-10-30 23:03:00 +00:00 
			
		
		
		
	MainActivity: Fix onBackPressed handling for open player
The change
b9dd7078ad
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:
		| @@ -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) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Profpatsch
					Profpatsch