Sort by "Oldest first" in Following only returns max 3 months old claims, instead of the acutally oldest ones #7733

Open
opened 2022-11-14 13:12:56 +01:00 by keikari · 2 comments
keikari commented 2022-11-14 13:12:56 +01:00 (Migrated from github.com)

claim_search in Following page has release_time: ">3 months ago". Which makes sort by "oldest first" not return oldest claims.
Also when sorting by "newest first", can only find claims up to that time.

oldest-first

https://www.reddit.com/r/lbry/comments/yuewmm/lbry_desktop_client_sorting_by_oldest_first/

`claim_search` in Following page has `release_time: ">3 months ago"`. Which makes sort by "oldest first" not return oldest claims. Also when sorting by "newest first", can only find claims up to that time. ![oldest-first](https://user-images.githubusercontent.com/34790748/201656758-95081457-e956-46ea-a7b5-0c5e8e8704f6.png) https://www.reddit.com/r/lbry/comments/yuewmm/lbry_desktop_client_sorting_by_oldest_first/
dgarrett01 commented 2022-11-15 01:39:15 +01:00 (Migrated from github.com)

This can be fixed by commenting out or removing these if conditions in ui\component\claimListDiscover\view.jsx...

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())};
}

This can be fixed by commenting out or removing these if conditions in ui\component\claimListDiscover\view.jsx... 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())}`; }
jessopb commented 2022-11-19 02:13:22 +01:00 (Migrated from github.com)

Yeah, I'll release a test to make sure we can greatly reduce or eliminate these.

Yeah, I'll release a test to make sure we can greatly reduce or eliminate these.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-desktop#7733
No description provided.