diff --git a/app/src/main/java/com/github/libretube/ui/views/CustomExoPlayerView.kt b/app/src/main/java/com/github/libretube/ui/views/CustomExoPlayerView.kt index 1d85feb25..09e661e0a 100644 --- a/app/src/main/java/com/github/libretube/ui/views/CustomExoPlayerView.kt +++ b/app/src/main/java/com/github/libretube/ui/views/CustomExoPlayerView.kt @@ -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) {