From 97ae825126980c704923e817ddbb2ce5871fbed3 Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Sat, 19 Nov 2022 12:31:05 -0500 Subject: [PATCH] Fix view count for playlist items --- src/components/VideoRowCell/VideoRowCell.bs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/VideoRowCell/VideoRowCell.bs b/src/components/VideoRowCell/VideoRowCell.bs index e7f118e0..4cc10559 100644 --- a/src/components/VideoRowCell/VideoRowCell.bs +++ b/src/components/VideoRowCell/VideoRowCell.bs @@ -6,7 +6,15 @@ function OnContentSet() if content <> invalid m.top.FindNode("titleLabel").text = content.title m.top.FindNode("authorLabel").text = content.author - m.top.FindNode("viewCountDateLabel").text = `${content.releaseDate} • ${FormatViewCount(content.viewCount)}` + + releaseDate = validstr(content.releaseDate) + viewCount = FormatViewCount(content.viewCount) + if releaseDate = "" and viewCount = "" + m.top.FindNode("viewCountDateLabel").text = "" + else + m.top.FindNode("viewCountDateLabel").text = `${releaseDate} • ${viewCount}` + end if + thumbnail = m.top.FindNode("thumbnail") thumbnail.uri = content.hdPosterUrl thumbnail.id = `thumbnail-${content.id}`