Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Commit

Permalink
Fix crash from RYD when video is being fullscreened
Browse files Browse the repository at this point in the history
  • Loading branch information
the-blank-x committed Feb 12, 2023
1 parent 5d222fc commit b26df18
Showing 1 changed file with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1547,11 +1547,18 @@ public void handleResult(@NonNull final StreamInfo info) {
new Thread(() -> {
info.setDislikeCount(ReturnYouTubeDislikeUtils.getDislikes(getContext(), info));
if (info.getDislikeCount() >= 0) {
if (activity == null) {
return;
}
activity.runOnUiThread(() -> {
binding.detailThumbsDownCountView.setText(Localization
.shortCount(activity, info.getDislikeCount()));
binding.detailThumbsDownCountView.setVisibility(View.VISIBLE);
binding.detailThumbsDownImgView.setVisibility(View.VISIBLE);
if (binding != null && binding.detailThumbsDownCountView != null) {
binding.detailThumbsDownCountView.setText(Localization
.shortCount(activity, info.getDislikeCount()));
binding.detailThumbsDownCountView.setVisibility(View.VISIBLE);
}
if (binding != null && binding.detailThumbsDownImgView != null) {
binding.detailThumbsDownImgView.setVisibility(View.VISIBLE);
}
});
}
}).start();
Expand Down

0 comments on commit b26df18

Please sign in to comment.