mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-13 05:40:31 +05:30
fix: video fails to play when shared to app with zero navbar tabs
This commit is contained in:
parent
b74fa0e463
commit
5e2bc2fe5e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user