From 93ebedc3287149431ec5c5900c3521ee73edcf1c Mon Sep 17 00:00:00 2001 From: GilesMunn Date: Sun, 9 Oct 2022 15:06:18 +0100 Subject: [PATCH] Added views placeholder to channel view. --- .../com/github/libretube/ui/adapters/ChannelAdapter.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/github/libretube/ui/adapters/ChannelAdapter.kt b/app/src/main/java/com/github/libretube/ui/adapters/ChannelAdapter.kt index c5e74b2fb..1aca3e56a 100644 --- a/app/src/main/java/com/github/libretube/ui/adapters/ChannelAdapter.kt +++ b/app/src/main/java/com/github/libretube/ui/adapters/ChannelAdapter.kt @@ -6,6 +6,7 @@ import android.view.LayoutInflater import android.view.ViewGroup import androidx.fragment.app.FragmentManager import androidx.recyclerview.widget.RecyclerView +import com.github.libretube.R import com.github.libretube.api.obj.StreamItem import com.github.libretube.databinding.VideoRowBinding import com.github.libretube.extensions.formatShort @@ -15,6 +16,7 @@ import com.github.libretube.ui.sheets.VideoOptionsBottomSheet import com.github.libretube.ui.viewholders.ChannelViewHolder import com.github.libretube.util.ImageHelper import com.github.libretube.util.NavigationHelper +import org.chromium.base.ContextUtils class ChannelAdapter( private val videoFeed: MutableList, @@ -46,8 +48,9 @@ class ChannelAdapter( videoTitle.text = video.title videoInfo.text = - video.views.formatShort() + " • " + - DateUtils.getRelativeTimeSpanString(video.uploaded!!) + video.views.formatShort() + " " + + ContextUtils.getApplicationContext().resources.getString(R.string.views_placeholder) + + " • " + DateUtils.getRelativeTimeSpanString(video.uploaded!!) thumbnailDuration.text = DateUtils.formatElapsedTime(video.duration!!)