From f79446b1e73e11fa53440f712bd295ad26af0d63 Mon Sep 17 00:00:00 2001 From: zeppi Date: Thu, 2 Dec 2021 15:18:21 -0500 Subject: [PATCH] update trending to use trending_score --- ui/constants/claim_search.js | 2 +- ui/page/channelsFollowingDiscover/view.jsx | 4 ++-- ui/util/buildHomepage.js | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ui/constants/claim_search.js b/ui/constants/claim_search.js index c1038613a..c02d5c234 100644 --- a/ui/constants/claim_search.js +++ b/ui/constants/claim_search.js @@ -28,7 +28,7 @@ export const FRESH_DEFAULT = 'default'; export const FRESH_TYPES = [FRESH_DEFAULT, FRESH_DAY, FRESH_WEEK, FRESH_MONTH, FRESH_YEAR, FRESH_ALL]; export const ORDER_BY_TRENDING = 'trending'; -export const ORDER_BY_TRENDING_VALUE = ['trending_group', 'trending_mixed']; +export const ORDER_BY_TRENDING_VALUE = ['trending_score']; // was ['trending_group', 'trending_mixed'] - deprecated export const ORDER_BY_TOP = 'top'; export const ORDER_BY_TOP_VALUE = ['effective_amount']; export const ORDER_BY_NEW = 'new'; diff --git a/ui/page/channelsFollowingDiscover/view.jsx b/ui/page/channelsFollowingDiscover/view.jsx index 91acd0f63..86f04770f 100644 --- a/ui/page/channelsFollowingDiscover/view.jsx +++ b/ui/page/channelsFollowingDiscover/view.jsx @@ -49,7 +49,7 @@ function ChannelsFollowingDiscover(props: Props) { options: { pageSize: 12, claimType: 'channel', - orderBy: ['effective_amount'], + orderBy: CS.ORDER_BY_TOP_VALUE, }, }); @@ -59,7 +59,7 @@ function ChannelsFollowingDiscover(props: Props) { options: { pageSize: 8, claimType: 'channel', - orderBy: ['trending_group', 'trending_mixed'], + orderBy: CS.ORDER_BY_TRENDING_VALUE, }, }); diff --git a/ui/util/buildHomepage.js b/ui/util/buildHomepage.js index eeee4b7de..f9f5f43f2 100644 --- a/ui/util/buildHomepage.js +++ b/ui/util/buildHomepage.js @@ -235,7 +235,7 @@ export function GetLinksData( )}`, options: { claimType: ['stream'], - orderBy: ['release_time'], + orderBy: CS.ORDER_BY_NEW_VALUE, pageSize: getPageSize(12), channelIds: YOUTUBER_CHANNEL_IDS, limitClaimsPerChannel: 1, @@ -248,7 +248,7 @@ export function GetLinksData( link: `/$/${PAGES.DISCOVER}?${CS.ORDER_BY_KEY}=${CS.ORDER_BY_TOP}&${CS.FRESH_KEY}=${CS.FRESH_DAY}`, options: { pageSize: getPageSize(showPersonalizedChannels || showPersonalizedTags ? 4 : 8), - orderBy: ['effective_amount'], + orderBy: CS.ORDER_BY_TOP_VALUEs, claimType: ['stream'], limitClaimsPerChannel: 2, releaseTime: `>${Math.floor(moment().subtract(1, 'day').startOf('day').unix())}`, @@ -259,7 +259,7 @@ export function GetLinksData( title: __('Top Channels On LBRY'), link: `/$/${PAGES.DISCOVER}?claim_type=channel&${CS.ORDER_BY_KEY}=${CS.ORDER_BY_TOP}&${CS.FRESH_KEY}=${CS.FRESH_ALL}`, options: { - orderBy: ['effective_amount'], + orderBy: CS.ORDER_BY_TOP_VALUE, claimType: ['channel'], }, }; @@ -268,7 +268,7 @@ export function GetLinksData( title: __('Latest From @lbry'), link: `/@lbry:3f`, options: { - orderBy: ['release_time'], + orderBy: CS.ORDER_BY_NEW_VALUE, pageSize: getPageSize(4), channelIds: ['3fda836a92faaceedfe398225fb9b2ee2ed1f01a'], },