1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-12-24 17:10:33 +00:00

Synchronize initRealtedVideoStreams*

This commit is contained in:
Coffeemakr 2017-06-27 12:44:20 +02:00
parent ec1ae647b0
commit cea706d14a
2 changed files with 8 additions and 13 deletions

View File

@ -768,7 +768,7 @@ public class VideoDetailFragment extends BaseFragment implements StreamExtractor
if (peek.getInfo() != null) { if (peek.getInfo() != null) {
final StreamInfo streamInfo = peek.getInfo(); final StreamInfo streamInfo = peek.getInfo();
uiHandler.post(new Runnable() { getActivity().runOnUiThread(new Runnable() {
@Override @Override
public void run() { public void run() {
selectAndHandleInfo(streamInfo); selectAndHandleInfo(streamInfo);
@ -932,16 +932,11 @@ public class VideoDetailFragment extends BaseFragment implements StreamExtractor
animateView(spinnerToolbar, true, 500); animateView(spinnerToolbar, true, 500);
setupActionBarHandler(info); setupActionBarHandler(info);
initThumbnailViews(info); initThumbnailViews(info);
uiHandler.post(new Runnable() { initRelatedVideos(info);
@Override if (wasRelatedStreamsExpanded) {
public void run() { toggleExpandRelatedVideos(currentStreamInfo);
initRelatedVideos(info); wasRelatedStreamsExpanded = false;
if (wasRelatedStreamsExpanded) { }
toggleExpandRelatedVideos(currentStreamInfo);
wasRelatedStreamsExpanded = false;
}
}
});
setTitleToUrl(info.webpage_url, info.title); setTitleToUrl(info.webpage_url, info.title);
setStreamInfoToUrl(info.webpage_url, info); setStreamInfoToUrl(info.webpage_url, info);

View File

@ -55,14 +55,14 @@ public class AnimationUtils {
view.animate().setListener(null).cancel(); view.animate().setListener(null).cancel();
view.setVisibility(View.VISIBLE); view.setVisibility(View.VISIBLE);
view.setAlpha(1f); view.setAlpha(1f);
if (execOnEnd != null) view.post(execOnEnd); if (execOnEnd != null) execOnEnd.run();
return; return;
} else if ((view.getVisibility() == View.GONE || view.getVisibility() == View.INVISIBLE) && !enterOrExit) { } else if ((view.getVisibility() == View.GONE || view.getVisibility() == View.INVISIBLE) && !enterOrExit) {
if (DEBUG) Log.d(TAG, "animateView() view was already gone > view = [" + view + "]"); if (DEBUG) Log.d(TAG, "animateView() view was already gone > view = [" + view + "]");
view.animate().setListener(null).cancel(); view.animate().setListener(null).cancel();
view.setVisibility(View.GONE); view.setVisibility(View.GONE);
view.setAlpha(0f); view.setAlpha(0f);
if (execOnEnd != null) view.post(execOnEnd); if (execOnEnd != null) execOnEnd.run();
return; return;
} }