Do not show the counter if ReturnYoutubeDislikes failed
This commit is contained in:
parent
bc9303bd9a
commit
99d03d69de
1 changed files with 8 additions and 6 deletions
|
@ -1570,12 +1570,14 @@ public final class VideoDetailFragment
|
||||||
if (info.getDislikeCount() == -1) {
|
if (info.getDislikeCount() == -1) {
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
info.setDislikeCount(ReturnYoutubeDislikeUtils.getDislikes(info));
|
info.setDislikeCount(ReturnYoutubeDislikeUtils.getDislikes(info));
|
||||||
|
if (info.getDislikeCount() >= 0) {
|
||||||
activity.runOnUiThread(() -> {
|
activity.runOnUiThread(() -> {
|
||||||
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);
|
||||||
binding.detailThumbsDownImgView.setVisibility(View.VISIBLE);
|
binding.detailThumbsDownImgView.setVisibility(View.VISIBLE);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}).start();
|
}).start();
|
||||||
}
|
}
|
||||||
if (info.getDislikeCount() >= 0) {
|
if (info.getDislikeCount() >= 0) {
|
||||||
|
|
Loading…
Reference in a new issue