This commit is contained in:
David Garrett 2022-11-21 19:16:21 -05:00
parent 17332979b6
commit f4cf36a87f
2 changed files with 14 additions and 15 deletions

Binary file not shown.

View file

@ -318,21 +318,20 @@ function ClaimListDiscover(props: Props) {
if (orderParam === CS.ORDER_BY_TOP && freshnessParam !== CS.FRESH_ALL) {
options.release_time = `>${Math.floor(moment().subtract(1, freshnessParam).startOf('hour').unix())}`;
} else if (orderParam === CS.ORDER_BY_NEW || orderParam === CS.ORDER_BY_TRENDING) {
// UPDATE: Commented out these lines of code to truly sort by oldest first...
//if (
// (options.channel_ids && options.channel_ids.length > 20) ||
// (options.any_tags && options.any_tags.length > 20)
//) {
// options.release_time = `>${Math.floor(moment().subtract(3, CS.FRESH_MONTH).startOf('week').unix())}`;
//} else if (
// (options.channel_ids && options.channel_ids.length > 10) ||
// (options.any_tags && options.any_tags.length > 10)
//) {
// options.release_time = `>${Math.floor(moment().subtract(1, CS.FRESH_YEAR).startOf('week').unix())}`;
//} else {
// // Hack for at least the New page until https://github.com/lbryio/lbry-sdk/issues/2591 is fixed
// options.release_time = `<${Math.floor(moment().startOf('minute').unix())}`;
//}
if (
(options.channel_ids && options.channel_ids.length > 20) ||
(options.any_tags && options.any_tags.length > 20)
) {
options.release_time = `>${Math.floor(moment().subtract(3, CS.FRESH_MONTH).startOf('week').unix())}`;
} else if (
(options.channel_ids && options.channel_ids.length > 10) ||
(options.any_tags && options.any_tags.length > 10)
) {
options.release_time = `>${Math.floor(moment().subtract(1, CS.FRESH_YEAR).startOf('week').unix())}`;
} else {
// Hack for at least the New page until https://github.com/lbryio/lbry-sdk/issues/2591 is fixed
options.release_time = `<${Math.floor(moment().startOf('minute').unix())}`;
}
}
}