use homepage LATEST for following discover #7185

Merged
jessopb merged 1 commit from feat-supportLocalAndPrimaryHomepages into master 2021-09-29 21:22:46 +02:00
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) {
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(

View file

@ -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<ChannelsFollowingItem> = [];
const notChannels = subscribedChannels