use homepage LATEST for following discover (#7185)
This commit is contained in:
parent
25b56ada48
commit
fdd2d503d9
2 changed files with 14 additions and 6 deletions
|
@ -22,11 +22,15 @@ 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) {
|
||||
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(
|
||||
(channel) => !channelsToSubscribe.includes(channel.uri)
|
||||
|
|
|
@ -28,11 +28,15 @@ 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) {
|
||||
if (CUSTOM_HOMEPAGE) {
|
||||
if (LATEST) {
|
||||
channelIds = LATEST.channelIds;
|
||||
} else if (PRIMARY_CONTENT) {
|
||||
channelIds = PRIMARY_CONTENT.channelIds;
|
||||
}
|
||||
}
|
||||
let rowData: Array<ChannelsFollowingItem> = [];
|
||||
const notChannels = subscribedChannels
|
||||
.map(({ uri }) => uri)
|
||||
|
|
Loading…
Reference in a new issue