Added support for showing when a comment has received a heart from the creator of a video.
This commit is contained in:
parent
39722a5563
commit
3874e16187
6 changed files with 42 additions and 1 deletions
|
|
@ -7,6 +7,7 @@ import android.text.style.URLSpan;
|
|||
import android.text.util.Linkify;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
|
|
@ -45,6 +46,7 @@ public class CommentsMiniInfoItemHolder extends InfoItemHolder {
|
|||
private final TextView itemContentView;
|
||||
private final TextView itemLikesCountView;
|
||||
private final TextView itemDislikesCountView;
|
||||
private final ImageView itemHeartView;
|
||||
private final TextView itemPublishedTime;
|
||||
|
||||
private String commentText;
|
||||
|
|
@ -80,6 +82,7 @@ public class CommentsMiniInfoItemHolder extends InfoItemHolder {
|
|||
itemDislikesCountView = itemView.findViewById(R.id.detail_thumbs_down_count_view);
|
||||
itemPublishedTime = itemView.findViewById(R.id.itemPublishedTime);
|
||||
itemContentView = itemView.findViewById(R.id.itemCommentContentView);
|
||||
itemHeartView = itemView.findViewById(R.id.detail_heart_img_view);
|
||||
|
||||
downloadThumbnailKey = infoItemBuilder.getContext().
|
||||
getString(R.string.download_thumbnail_key);
|
||||
|
|
@ -152,6 +155,10 @@ public class CommentsMiniInfoItemHolder extends InfoItemHolder {
|
|||
itemPublishedTime.setText(item.getTextualUploadDate());
|
||||
}
|
||||
|
||||
if (item.isHeartedByUploader()) {
|
||||
itemHeartView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
itemView.setOnClickListener(view -> {
|
||||
toggleEllipsize();
|
||||
if (itemBuilder.getOnCommentsSelectedListener() != null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue