mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 14:20:30 +05:30
Fix shrinked player layout after PiP (#3342)
* Fix shrinked player layout after PiP
This commit is contained in:
parent
3eb1a3805e
commit
17ae715d32
@ -17,6 +17,7 @@ import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.os.postDelayed
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.core.view.marginStart
|
||||
import androidx.core.view.updateLayoutParams
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import com.github.libretube.R
|
||||
@ -594,7 +595,8 @@ internal class CustomExoPlayerView(
|
||||
updateTopBarMargin()
|
||||
|
||||
// don't add extra padding if there's no cutout
|
||||
if (ViewCompat.getRootWindowInsets(this)?.displayCutout == null) return
|
||||
val hasCutout = ViewCompat.getRootWindowInsets(this)?.displayCutout != null
|
||||
if (!hasCutout && binding.topBar.marginStart == 0) return
|
||||
|
||||
// add a margin to the top and the bottom bar in landscape mode for notches
|
||||
val newMargin = when (newConfig?.orientation) {
|
||||
|
Loading…
Reference in New Issue
Block a user