Merge pull request #3917 from Bnyro/master

Re-add the separator in the search results
This commit is contained in:
Bnyro 2023-06-03 21:53:39 +02:00 committed by GitHub
commit 35bc07829f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -115,7 +115,6 @@ class VideosAdapter(
?: holder.allCaughtUpBinding)!!.root.context ?: holder.allCaughtUpBinding)!!.root.context
val uploadDate = val uploadDate =
video.uploaded?.takeIf { it > 0 }?.let { TextUtils.formatRelativeDate(context, it) } video.uploaded?.takeIf { it > 0 }?.let { TextUtils.formatRelativeDate(context, it) }
?.toString().orEmpty()
// Trending layout // Trending layout
holder.trendingRowBinding?.apply { holder.trendingRowBinding?.apply {
@ -133,7 +132,7 @@ class VideosAdapter(
R.string.trending_views, R.string.trending_views,
video.uploaderName, video.uploaderName,
video.views.formatShort(), video.views.formatShort(),
uploadDate, uploadDate?.toString().orEmpty(),
) )
video.duration?.let { thumbnailDuration.setFormattedDuration(it, video.isShort) } video.duration?.let { thumbnailDuration.setFormattedDuration(it, video.isShort) }
channelImage.setOnClickListener { channelImage.setOnClickListener {
@ -164,7 +163,7 @@ class VideosAdapter(
videoInfo.text = root.context.getString( videoInfo.text = root.context.getString(
R.string.normal_views, R.string.normal_views,
video.views.formatShort(), video.views.formatShort(),
uploadDate, uploadDate?.let { " ${TextUtils.SEPARATOR} $it" },
) )
thumbnailDuration.text = video.duration?.let { DateUtils.formatElapsedTime(it) } thumbnailDuration.text = video.duration?.let { DateUtils.formatElapsedTime(it) }