mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-29 00:10:32 +05:30
Merge pull request #4949 from Bnyro/master
fix: remove view count from continue watching section
This commit is contained in:
commit
2043077673
@ -119,8 +119,9 @@ class VideosAdapter(
|
||||
val activity = (context as BaseActivity)
|
||||
val fragmentManager = activity.supportFragmentManager
|
||||
|
||||
val uploadDate =
|
||||
video.uploaded.takeIf { it > 0 }?.let { TextUtils.formatRelativeDate(context, it) }
|
||||
val uploadDateStr = video.uploaded.takeIf { it > 0 }
|
||||
?.let { TextUtils.formatRelativeDate(context, it) }
|
||||
?.toString()
|
||||
|
||||
// Trending layout
|
||||
holder.trendingRowBinding?.apply {
|
||||
@ -134,12 +135,16 @@ class VideosAdapter(
|
||||
}
|
||||
|
||||
textViewTitle.text = video.title
|
||||
textViewChannel.text = root.context.getString(
|
||||
textViewChannel.text = if ((video.views ?: 0L) > 0L) {
|
||||
root.context.getString(
|
||||
R.string.trending_views,
|
||||
video.uploaderName,
|
||||
video.views.formatShort(),
|
||||
uploadDate?.toString().orEmpty()
|
||||
uploadDateStr
|
||||
)
|
||||
} else {
|
||||
"${video.uploaderName} ${TextUtils.SEPARATOR} $uploadDateStr"
|
||||
}
|
||||
video.duration?.let { thumbnailDuration.setFormattedDuration(it, video.isShort) }
|
||||
channelImage.setOnClickListener {
|
||||
NavigationHelper.navigateChannel(root.context, video.uploaderUrl)
|
||||
@ -171,7 +176,7 @@ class VideosAdapter(
|
||||
videoInfo.text = root.context.getString(
|
||||
R.string.normal_views,
|
||||
video.views.formatShort(),
|
||||
uploadDate?.let { " ${TextUtils.SEPARATOR} $it" }
|
||||
uploadDateStr?.let { " ${TextUtils.SEPARATOR} $it" }
|
||||
)
|
||||
|
||||
thumbnailDuration.text = video.duration?.let { DateUtils.formatElapsedTime(it) }
|
||||
|
Loading…
x
Reference in New Issue
Block a user