Prevent tapping on thumbnail if video details are not loaded
This commit is contained in:
parent
ca0f56eea8
commit
f9994abb94
1 changed files with 11 additions and 5 deletions
|
@ -505,12 +505,18 @@ public final class VideoDetailFragment
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case R.id.detail_thumbnail_root_layout:
|
case R.id.detail_thumbnail_root_layout:
|
||||||
autoPlayEnabled = true; // forcefully start playing
|
// make sure not to open any player if there is nothing currently loaded!
|
||||||
// FIXME Workaround #7427
|
// FIXME removing this `if` causes the player service to start correctly, then stop,
|
||||||
if (isPlayerAvailable()) {
|
// then restart badly without calling `startForeground()`, causing a crash when
|
||||||
player.setRecovery();
|
// later closing the detail fragment
|
||||||
|
if (currentInfo != null) {
|
||||||
|
autoPlayEnabled = true; // forcefully start playing
|
||||||
|
// FIXME Workaround #7427
|
||||||
|
if (isPlayerAvailable()) {
|
||||||
|
player.setRecovery();
|
||||||
|
}
|
||||||
|
openVideoPlayerAutoFullscreen();
|
||||||
}
|
}
|
||||||
openVideoPlayerAutoFullscreen();
|
|
||||||
break;
|
break;
|
||||||
case R.id.detail_title_root_layout:
|
case R.id.detail_title_root_layout:
|
||||||
toggleTitleAndSecondaryControls();
|
toggleTitleAndSecondaryControls();
|
||||||
|
|
Loading…
Reference in a new issue