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);
|
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('#');
|
const atVanityURI = !uri.includes('#');
|
||||||
|
|
||||||
let recommendedContent;
|
let recommendedContent;
|
||||||
|
@ -2234,9 +2234,11 @@ const makeSelectRecommendedContentForUri = uri => reselect.createSelector(makeSe
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const searchQuery = getSearchQueryString(title.replace(/\//, ' '), undefined, undefined, {
|
const options = { related_to: claim.claim_id };
|
||||||
related_to: claim.claim_id
|
if (!isMature) {
|
||||||
});
|
options['nsfw'] = false;
|
||||||
|
}
|
||||||
|
const searchQuery = getSearchQueryString(title.replace(/\//, ' '), undefined, undefined, options);
|
||||||
|
|
||||||
let searchUris = searchUrisByQuery[searchQuery];
|
let searchUris = searchUrisByQuery[searchQuery];
|
||||||
if (searchUris) {
|
if (searchUris) {
|
||||||
|
|
|
@ -499,7 +499,8 @@ export const makeSelectRecommendedContentForUri = (uri: string) =>
|
||||||
createSelector(
|
createSelector(
|
||||||
makeSelectClaimForUri(uri),
|
makeSelectClaimForUri(uri),
|
||||||
selectSearchUrisByQuery,
|
selectSearchUrisByQuery,
|
||||||
(claim, searchUrisByQuery) => {
|
makeSelectClaimIsNsfw(uri),
|
||||||
|
(claim, searchUrisByQuery, isMature) => {
|
||||||
const atVanityURI = !uri.includes('#');
|
const atVanityURI = !uri.includes('#');
|
||||||
|
|
||||||
let recommendedContent;
|
let recommendedContent;
|
||||||
|
@ -513,9 +514,11 @@ export const makeSelectRecommendedContentForUri = (uri: string) =>
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const searchQuery = getSearchQueryString(title.replace(/\//, ' '), undefined, undefined, {
|
const options = { related_to: claim.claim_id }
|
||||||
related_to: claim.claim_id,
|
if (!isMature) {
|
||||||
});
|
options['nsfw'] = false;
|
||||||
|
}
|
||||||
|
const searchQuery = getSearchQueryString(title.replace(/\//, ' '), undefined, undefined, options);
|
||||||
|
|
||||||
let searchUris = searchUrisByQuery[searchQuery];
|
let searchUris = searchUrisByQuery[searchQuery];
|
||||||
if (searchUris) {
|
if (searchUris) {
|
||||||
|
|
Loading…
Reference in a new issue