Merge pull request #267 from lbryio/feat-recommendedResultsNoMature
Feat recommended results no mature
This commit is contained in:
commit
b4512c25e3
2 changed files with 13 additions and 8 deletions
10
dist/bundle.es.js
vendored
10
dist/bundle.es.js
vendored
|
@ -2220,7 +2220,7 @@ claim => {
|
|||
return isClaimNsfw(claim);
|
||||
});
|
||||
|
||||
const makeSelectRecommendedContentForUri = uri => reselect.createSelector(makeSelectClaimForUri(uri), selectSearchUrisByQuery, (claim, searchUrisByQuery) => {
|
||||
const makeSelectRecommendedContentForUri = uri => reselect.createSelector(makeSelectClaimForUri(uri), selectSearchUrisByQuery, makeSelectClaimIsNsfw(uri), (claim, searchUrisByQuery, isMature) => {
|
||||
const atVanityURI = !uri.includes('#');
|
||||
|
||||
let recommendedContent;
|
||||
|
@ -2234,9 +2234,11 @@ const makeSelectRecommendedContentForUri = uri => reselect.createSelector(makeSe
|
|||
return;
|
||||
}
|
||||
|
||||
const searchQuery = getSearchQueryString(title.replace(/\//, ' '), undefined, undefined, {
|
||||
related_to: claim.claim_id
|
||||
});
|
||||
const options = { related_to: claim.claim_id };
|
||||
if (!isMature) {
|
||||
options['nsfw'] = false;
|
||||
}
|
||||
const searchQuery = getSearchQueryString(title.replace(/\//, ' '), undefined, undefined, options);
|
||||
|
||||
let searchUris = searchUrisByQuery[searchQuery];
|
||||
if (searchUris) {
|
||||
|
|
|
@ -499,7 +499,8 @@ export const makeSelectRecommendedContentForUri = (uri: string) =>
|
|||
createSelector(
|
||||
makeSelectClaimForUri(uri),
|
||||
selectSearchUrisByQuery,
|
||||
(claim, searchUrisByQuery) => {
|
||||
makeSelectClaimIsNsfw(uri),
|
||||
(claim, searchUrisByQuery, isMature) => {
|
||||
const atVanityURI = !uri.includes('#');
|
||||
|
||||
let recommendedContent;
|
||||
|
@ -513,9 +514,11 @@ export const makeSelectRecommendedContentForUri = (uri: string) =>
|
|||
return;
|
||||
}
|
||||
|
||||
const searchQuery = getSearchQueryString(title.replace(/\//, ' '), undefined, undefined, {
|
||||
related_to: claim.claim_id,
|
||||
});
|
||||
const options = { related_to: claim.claim_id }
|
||||
if (!isMature) {
|
||||
options['nsfw'] = false;
|
||||
}
|
||||
const searchQuery = getSearchQueryString(title.replace(/\//, ' '), undefined, undefined, options);
|
||||
|
||||
let searchUris = searchUrisByQuery[searchQuery];
|
||||
if (searchUris) {
|
||||
|
|
Loading…
Reference in a new issue