From 1c11367839ac3bfbd6a64bc05f8c51c3d25fa83a Mon Sep 17 00:00:00 2001 From: Xilin Jia <6257601+XilinJia@users.noreply.github.com> Date: Mon, 24 Jun 2024 22:10:45 +0100 Subject: [PATCH] 6.0.1 commit --- .../main/kotlin/ac/mdiq/podcini/ui/activity/MainActivity.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/ac/mdiq/podcini/ui/activity/MainActivity.kt b/app/src/main/kotlin/ac/mdiq/podcini/ui/activity/MainActivity.kt index fab3719c..220c2940 100644 --- a/app/src/main/kotlin/ac/mdiq/podcini/ui/activity/MainActivity.kt +++ b/app/src/main/kotlin/ac/mdiq/podcini/ui/activity/MainActivity.kt @@ -400,8 +400,8 @@ class MainActivity : CastEnabledActivity() { navigationBarInsets.bottom + (if (visible) externalPlayerHeight else 0)) mainView.layoutParams = params val playerView = findViewById(R.id.playerFragment1) - val playerParams = playerView.layoutParams as MarginLayoutParams - playerParams.setMargins(navigationBarInsets.left, 0, navigationBarInsets.right, 0) + val playerParams = playerView?.layoutParams as? MarginLayoutParams + playerParams?.setMargins(navigationBarInsets.left, 0, navigationBarInsets.right, 0) playerView.layoutParams = playerParams audioPlayerFragmentView.visibility = if (visible) View.VISIBLE else View.GONE }