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) {
|
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) {
|
||||||
|
if (LATEST) {
|
||||||
|
channelIds = LATEST.channelIds;
|
||||||
|
} else if (PRIMARY_CONTENT) {
|
||||||
channelIds = PRIMARY_CONTENT.channelIds;
|
channelIds = PRIMARY_CONTENT.channelIds;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
const followingCount = (subscribedChannels && subscribedChannels.length) || 0;
|
const followingCount = (subscribedChannels && subscribedChannels.length) || 0;
|
||||||
const followingCountIgnoringAutoFollows = (subscribedChannels || []).filter(
|
const followingCountIgnoringAutoFollows = (subscribedChannels || []).filter(
|
||||||
(channel) => !channelsToSubscribe.includes(channel.uri)
|
(channel) => !channelsToSubscribe.includes(channel.uri)
|
||||||
|
|
|
@ -28,11 +28,15 @@ 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) {
|
||||||
|
if (LATEST) {
|
||||||
|
channelIds = LATEST.channelIds;
|
||||||
|
} else if (PRIMARY_CONTENT) {
|
||||||
channelIds = PRIMARY_CONTENT.channelIds;
|
channelIds = PRIMARY_CONTENT.channelIds;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
let rowData: Array<ChannelsFollowingItem> = [];
|
let rowData: Array<ChannelsFollowingItem> = [];
|
||||||
const notChannels = subscribedChannels
|
const notChannels = subscribedChannels
|
||||||
.map(({ uri }) => uri)
|
.map(({ uri }) => uri)
|
||||||
|
|
Loading…
Reference in a new issue