use homepage LATEST for following discover (#7185)

This commit is contained in:
jessopb 2021-09-29 15:22:46 -04:00 committed by GitHub
parent 25b56ada48
commit fdd2d503d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 6 deletions

View file

@ -22,10 +22,14 @@ const channelsToSubscribe = AUTO_FOLLOW_CHANNELS.trim()
function UserChannelFollowIntro(props: Props) { function UserChannelFollowIntro(props: Props) {
const { subscribedChannels, channelSubscribe, onContinue, homepageData, prefsReady } = props; const { subscribedChannels, channelSubscribe, onContinue, homepageData, prefsReady } = props;
const { PRIMARY_CONTENT } = homepageData; const { PRIMARY_CONTENT, LATEST } = homepageData;
let channelIds; let channelIds;
if (PRIMARY_CONTENT && CUSTOM_HOMEPAGE) { if (CUSTOM_HOMEPAGE) {
channelIds = PRIMARY_CONTENT.channelIds; if (LATEST) {
channelIds = LATEST.channelIds;
} else if (PRIMARY_CONTENT) {
channelIds = PRIMARY_CONTENT.channelIds;
}
} }
const followingCount = (subscribedChannels && subscribedChannels.length) || 0; const followingCount = (subscribedChannels && subscribedChannels.length) || 0;
const followingCountIgnoringAutoFollows = (subscribedChannels || []).filter( const followingCountIgnoringAutoFollows = (subscribedChannels || []).filter(

View file

@ -28,10 +28,14 @@ type ChannelsFollowingItem = {
function ChannelsFollowingDiscover(props: Props) { function ChannelsFollowingDiscover(props: Props) {
const { followedTags, subscribedChannels, blockedChannels, homepageData } = props; const { followedTags, subscribedChannels, blockedChannels, homepageData } = props;
const { PRIMARY_CONTENT } = homepageData; const { PRIMARY_CONTENT, LATEST } = homepageData;
let channelIds; let channelIds;
if (PRIMARY_CONTENT && CUSTOM_HOMEPAGE) { if (CUSTOM_HOMEPAGE) {
channelIds = PRIMARY_CONTENT.channelIds; if (LATEST) {
channelIds = LATEST.channelIds;
} else if (PRIMARY_CONTENT) {
channelIds = PRIMARY_CONTENT.channelIds;
}
} }
let rowData: Array<ChannelsFollowingItem> = []; let rowData: Array<ChannelsFollowingItem> = [];
const notChannels = subscribedChannels const notChannels = subscribedChannels