We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3fb808b commit 4eb6e1fCopy full SHA for 4eb6e1f
1 file changed
app/src/main/java/com/nextcloud/client/player/ui/PlayerActivity.kt
@@ -87,10 +87,14 @@ class PlayerActivity :
87
.onEach { handleEvent(it) }
88
.launchIn(lifecycleScope)
89
90
- if (isPictureInPictureAllowed()) {
+ onBackPressedCallback = onBackPressedDispatcher.addCallback(this) {
91
val isVideoPlayback = playbackFileType == PlaybackFileType.VIDEO
92
- onBackPressedCallback = onBackPressedDispatcher.addCallback(this, enabled = isVideoPlayback) {
+
93
+ if (isPictureInPictureAllowed() && isVideoPlayback) {
94
switchToPictureInPictureMode()
95
+ } else {
96
+ file = file?.parentId?.let { storageManager.getFileById(it) }
97
+ finish()
98
}
99
100
0 commit comments