From 6fd34c13d16d949e98ab0aff55ce855b076b9b84 Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Sun, 22 Oct 2023 16:08:56 -0400 Subject: [PATCH] A fix for upcoming videos --- .../components/VideoFeed/VideoRowCell/VideoRowCell.bs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/playlet-lib/src/components/VideoFeed/VideoRowCell/VideoRowCell.bs b/playlet-lib/src/components/VideoFeed/VideoRowCell/VideoRowCell.bs index b875e1ca..b0bc7966 100644 --- a/playlet-lib/src/components/VideoFeed/VideoRowCell/VideoRowCell.bs +++ b/playlet-lib/src/components/VideoFeed/VideoRowCell/VideoRowCell.bs @@ -17,7 +17,8 @@ function FindChildren() m.thumbnail = m.top.FindNode("thumbnail") end function -' TODO:P0 premeres in x hours is not displayed correctly, and ends up failing with an error +' TODO:P1 premeres in x hours is not displayed correctly, and ends up failing with an error +' Need to try not a live event, but a video function OnContentSet() as void content = m.top.itemContent @@ -32,14 +33,16 @@ function OnContentSet() as void m.titleLabel.text = content.title m.authorLabel.text = content.author - if not StringUtils.IsNullOrEmpty(content.publishedText) + if content.isUpcoming = true + m.viewCountDateLabel.text = content.premiereTimestampText + else if not StringUtils.IsNullOrEmpty(content.publishedText) label = content.publishedText if not StringUtils.IsNullOrEmpty(content.viewCountText) label = `${label} • ${content.viewCountText}` end if m.viewCountDateLabel.text = label - else if content.isUpcoming = true - m.viewCountDateLabel.text = content.premiereTimestampText + else + m.viewCountDateLabel.text = "" end if m.thumbnail.uri = content.thumbnail