Fix crash from RYD when video is being fullscreened
This commit is contained in:
parent
5d222fce16
commit
b26df18183
1 changed files with 11 additions and 4 deletions
|
@ -1547,11 +1547,18 @@ public final class VideoDetailFragment
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
info.setDislikeCount(ReturnYouTubeDislikeUtils.getDislikes(getContext(), info));
|
info.setDislikeCount(ReturnYouTubeDislikeUtils.getDislikes(getContext(), info));
|
||||||
if (info.getDislikeCount() >= 0) {
|
if (info.getDislikeCount() >= 0) {
|
||||||
|
if (activity == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
activity.runOnUiThread(() -> {
|
activity.runOnUiThread(() -> {
|
||||||
|
if (binding != null && binding.detailThumbsDownCountView != null) {
|
||||||
binding.detailThumbsDownCountView.setText(Localization
|
binding.detailThumbsDownCountView.setText(Localization
|
||||||
.shortCount(activity, info.getDislikeCount()));
|
.shortCount(activity, info.getDislikeCount()));
|
||||||
binding.detailThumbsDownCountView.setVisibility(View.VISIBLE);
|
binding.detailThumbsDownCountView.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
if (binding != null && binding.detailThumbsDownImgView != null) {
|
||||||
binding.detailThumbsDownImgView.setVisibility(View.VISIBLE);
|
binding.detailThumbsDownImgView.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
|
|
Loading…
Reference in a new issue