stability improvements

This commit is contained in:
Christian Schabesberger 2016-09-27 20:18:41 +02:00
parent ca0d594547
commit 76ba2824a2
1 changed files with 124 additions and 120 deletions

View File

@ -143,6 +143,9 @@ public class VideoItemDetailFragment extends Fragment {
View topView = activity.findViewById(R.id.detailTopView);
Button channelButton = (Button) activity.findViewById(R.id.channel_button);
// prevents a crash if the activity/fragment was already left when the response came
if(channelButton != null) {
progressBar.setVisibility(View.GONE);
if (info.next_video != null) {
// todo: activate this function or remove it
@ -284,6 +287,7 @@ public class VideoItemDetailFragment extends Fragment {
initThumbnailViews(info);
}
}
private void initThumbnailViews(final StreamInfo info) {
ImageView videoThumbnailView = (ImageView) activity.findViewById(R.id.detail_thumbnail_view);