Merge pull request #6695 from Bnyro/master

fix: live videos shown as uploaded in 1970 in watch history
This commit is contained in:
Bnyro 2024-11-04 17:01:31 +01:00 committed by GitHub
commit d23ae09150
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -54,7 +54,8 @@ class WatchHistoryAdapter(
holder.binding.apply { holder.binding.apply {
videoTitle.text = video.title videoTitle.text = video.title
channelName.text = video.uploader channelName.text = video.uploader
videoInfo.text = video.uploadDate?.let { TextUtils.localizeDate(it) } videoInfo.text =
video.uploadDate?.takeIf { !video.isLive }?.let { TextUtils.localizeDate(it) }
ImageHelper.loadImage(video.thumbnailUrl, thumbnail) ImageHelper.loadImage(video.thumbnailUrl, thumbnail)
if (video.duration != null) { if (video.duration != null) {