From 4a03b2209c89243d00388464818e198d4655a59c Mon Sep 17 00:00:00 2001 From: Bnyro Date: Sun, 8 May 2022 17:12:03 +0200 Subject: [PATCH] Use formatShort() for Like Count --- .../java/com/github/libretube/adapters/CommentsAdapter.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/github/libretube/adapters/CommentsAdapter.kt b/app/src/main/java/com/github/libretube/adapters/CommentsAdapter.kt index 0dbb3ca28..d3760dcda 100644 --- a/app/src/main/java/com/github/libretube/adapters/CommentsAdapter.kt +++ b/app/src/main/java/com/github/libretube/adapters/CommentsAdapter.kt @@ -1,14 +1,13 @@ package com.github.libretube.adapters -import android.content.Context import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.ImageView import android.widget.TextView -import android.widget.Toast import androidx.recyclerview.widget.RecyclerView import com.github.libretube.R +import com.github.libretube.formatShort import com.github.libretube.obj.Comment import com.squareup.picasso.Picasso @@ -24,7 +23,7 @@ class CommentsAdapter(private val comments: List): RecyclerView.Adapte holder.v.findViewById(R.id.comment_text).text = comments[position].commentText.toString() val thumbnailImage = holder.v.findViewById(R.id.commentor_image) Picasso.get().load(comments[position].thumbnail).into(thumbnailImage) - holder.v.findViewById(R.id.likes_textView).text = comments[position].likeCount.toString() + holder.v.findViewById(R.id.likes_textView).text = comments[position].likeCount?.toLong().formatShort() if (comments[position].verified == true) { holder.v.findViewById(R.id.verified_imageView).visibility = View.VISIBLE }