Do not show the counter if ReturnYoutubeDislikes failed

This commit is contained in:
tr7zw 2022-01-28 21:44:16 +01:00
parent bc9303bd9a
commit 99d03d69de

View file

@ -1570,12 +1570,14 @@ public final class VideoDetailFragment
if (info.getDislikeCount() == -1) {
new Thread(() -> {
info.setDislikeCount(ReturnYoutubeDislikeUtils.getDislikes(info));
activity.runOnUiThread(() -> {
binding.detailThumbsDownCountView.setText(Localization
.shortCount(activity, info.getDislikeCount()));
binding.detailThumbsDownCountView.setVisibility(View.VISIBLE);
binding.detailThumbsDownImgView.setVisibility(View.VISIBLE);
});
if (info.getDislikeCount() >= 0) {
activity.runOnUiThread(() -> {
binding.detailThumbsDownCountView.setText(Localization
.shortCount(activity, info.getDislikeCount()));
binding.detailThumbsDownCountView.setVisibility(View.VISIBLE);
binding.detailThumbsDownImgView.setVisibility(View.VISIBLE);
});
}
}).start();
}
if (info.getDislikeCount() >= 0) {