Merge pull request #6573 from Bnyro/master

fix: video fails to play when shared to app with zero navbar tabs
This commit is contained in:
Bnyro 2024-10-02 12:12:03 +02:00 committed by GitHub
commit b5cf18fe12
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -20,6 +20,7 @@ import androidx.core.net.toUri
import androidx.core.os.bundleOf
import androidx.core.view.allViews
import androidx.core.view.children
import androidx.core.view.isNotEmpty
import androidx.core.view.isVisible
import androidx.core.widget.NestedScrollView
import androidx.lifecycle.lifecycleScope
@ -528,7 +529,7 @@ class MainActivity : BaseActivity() {
intent.getStringExtra(IntentData.videoId)?.let {
// the below explained work around only seems to work on Android 11 and above
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R && binding.bottomNav.menu.isNotEmpty()) {
// the bottom navigation bar has to be created before opening the video
// otherwise the player layout measures aren't calculated properly
// and the miniplayer is opened at a closed state and overlapping the navigation bar