Fix loading StreamInfo twice on first VideoDetailFragment opening
This commit is contained in:
parent
e994ec1fd0
commit
0b7d9783db
1 changed files with 5 additions and 1 deletions
|
|
@ -452,8 +452,12 @@ public final class NavigationHelper {
|
||||||
if (fragment instanceof VideoDetailFragment && fragment.isVisible()) {
|
if (fragment instanceof VideoDetailFragment && fragment.isVisible()) {
|
||||||
onVideoDetailFragmentReady.run((VideoDetailFragment) fragment);
|
onVideoDetailFragmentReady.run((VideoDetailFragment) fragment);
|
||||||
} else {
|
} else {
|
||||||
|
// Specify no videoUrl here, otherwise the VideoDetailFragment will start loading the
|
||||||
|
// video automatically if it's the first time it is being opened, but then
|
||||||
|
// onVideoDetailFragmentReady will kick in and start another loading process.
|
||||||
|
// See VideoDetailFragment.wasCleared() and its usage in doInitialLoadLogic().
|
||||||
final VideoDetailFragment instance = VideoDetailFragment
|
final VideoDetailFragment instance = VideoDetailFragment
|
||||||
.getInstance(serviceId, url, title, playQueue);
|
.getInstance(serviceId, null, title, playQueue);
|
||||||
instance.setAutoPlay(autoPlay);
|
instance.setAutoPlay(autoPlay);
|
||||||
|
|
||||||
defaultTransaction(fragmentManager)
|
defaultTransaction(fragmentManager)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue