From fdd2d503d9aacc9f0f810e7f491cc9d6fd1adfc9 Mon Sep 17 00:00:00 2001 From: jessopb <36554050+jessopb@users.noreply.github.com> Date: Wed, 29 Sep 2021 15:22:46 -0400 Subject: [PATCH] use homepage LATEST for following discover (#7185) --- ui/component/userChannelFollowIntro/view.jsx | 10 +++++++--- ui/page/channelsFollowingDiscover/view.jsx | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ui/component/userChannelFollowIntro/view.jsx b/ui/component/userChannelFollowIntro/view.jsx index 55f6245b4..409ddba43 100644 --- a/ui/component/userChannelFollowIntro/view.jsx +++ b/ui/component/userChannelFollowIntro/view.jsx @@ -22,10 +22,14 @@ const channelsToSubscribe = AUTO_FOLLOW_CHANNELS.trim() function UserChannelFollowIntro(props: Props) { const { subscribedChannels, channelSubscribe, onContinue, homepageData, prefsReady } = props; - const { PRIMARY_CONTENT } = homepageData; + const { PRIMARY_CONTENT, LATEST } = homepageData; let channelIds; - if (PRIMARY_CONTENT && CUSTOM_HOMEPAGE) { - channelIds = PRIMARY_CONTENT.channelIds; + if (CUSTOM_HOMEPAGE) { + if (LATEST) { + channelIds = LATEST.channelIds; + } else if (PRIMARY_CONTENT) { + channelIds = PRIMARY_CONTENT.channelIds; + } } const followingCount = (subscribedChannels && subscribedChannels.length) || 0; const followingCountIgnoringAutoFollows = (subscribedChannels || []).filter( diff --git a/ui/page/channelsFollowingDiscover/view.jsx b/ui/page/channelsFollowingDiscover/view.jsx index a89737530..4c7c2f85a 100644 --- a/ui/page/channelsFollowingDiscover/view.jsx +++ b/ui/page/channelsFollowingDiscover/view.jsx @@ -28,10 +28,14 @@ type ChannelsFollowingItem = { function ChannelsFollowingDiscover(props: Props) { const { followedTags, subscribedChannels, blockedChannels, homepageData } = props; - const { PRIMARY_CONTENT } = homepageData; + const { PRIMARY_CONTENT, LATEST } = homepageData; let channelIds; - if (PRIMARY_CONTENT && CUSTOM_HOMEPAGE) { - channelIds = PRIMARY_CONTENT.channelIds; + if (CUSTOM_HOMEPAGE) { + if (LATEST) { + channelIds = LATEST.channelIds; + } else if (PRIMARY_CONTENT) { + channelIds = PRIMARY_CONTENT.channelIds; + } } let rowData: Array = []; const notChannels = subscribedChannels