mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 07:50:31 +05:30
Show the comment reply count
This commit is contained in:
parent
499607830e
commit
0e8c3043ae
@ -11,8 +11,9 @@ data class Comment(
|
||||
val commentorUrl: String? = null,
|
||||
val repliesPage: String? = null,
|
||||
val hearted: Boolean? = null,
|
||||
val likeCount: Int? = null,
|
||||
val likeCount: Long? = null,
|
||||
val pinned: Boolean? = null,
|
||||
val thumbnail: String? = null,
|
||||
val verified: Boolean? = null
|
||||
val verified: Boolean? = null,
|
||||
val replyCount: Long? = null
|
||||
)
|
||||
|
@ -64,12 +64,13 @@ class CommentsAdapter(
|
||||
commentText.text = comment.commentText.toString()
|
||||
|
||||
ImageHelper.loadImage(comment.thumbnail, commentorImage)
|
||||
likesTextView.text = comment.likeCount?.toLong().formatShort()
|
||||
likesTextView.text = comment.likeCount.formatShort()
|
||||
|
||||
if (comment.verified == true) verifiedImageView.visibility = View.VISIBLE
|
||||
if (comment.pinned == true) pinnedImageView.visibility = View.VISIBLE
|
||||
if (comment.hearted == true) heartedImageView.visibility = View.VISIBLE
|
||||
if (comment.repliesPage != null) commentsAvailable.visibility = View.VISIBLE
|
||||
if (comment.repliesPage != null) repliesAvailable.visibility = View.VISIBLE
|
||||
if ((comment.replyCount ?: -1L) > 0L) repliesCount.text = comment.replyCount?.formatShort()
|
||||
|
||||
commentorImage.setOnClickListener {
|
||||
NavigationHelper.navigateChannel(root.context, comment.commentorUrl)
|
||||
|
@ -87,13 +87,13 @@
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
app:srcCompat="@drawable/ic_thumb_up" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/likes_textView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
tools:text="LikeCount" />
|
||||
|
||||
<ImageView
|
||||
@ -106,7 +106,7 @@
|
||||
app:srcCompat="@drawable/ic_hearted" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/comments_available"
|
||||
android:id="@+id/replies_available"
|
||||
android:layout_width="14dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_marginStart="8dp"
|
||||
@ -114,6 +114,13 @@
|
||||
android:visibility="gone"
|
||||
app:srcCompat="@drawable/ic_comment" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/replies_count"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
tools:text="LikeCount" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@ -128,7 +135,6 @@
|
||||
android:nestedScrollingEnabled="false" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:visibility="gone"
|
||||
android:id="@+id/show_more"
|
||||
style="@style/Widget.Material3.Button.ElevatedButton"
|
||||
android:layout_width="wrap_content"
|
||||
@ -139,6 +145,7 @@
|
||||
android:text="@string/show_more"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone"
|
||||
app:cornerRadius="20dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
Loading…
x
Reference in New Issue
Block a user