fixes hidden claims notification

This commit is contained in:
jessop 2019-11-25 15:11:32 -05:00
parent 15934866e1
commit b09b7745b7
3 changed files with 20 additions and 0 deletions

7
dist/bundle.es.js vendored
View file

@ -2041,6 +2041,12 @@ const makeSelectNsfwCountForChannel = uri => reselect.createSelector(selectClaim
}, 0);
});
const makeSelectOmittedCountForChannel = uri => reselect.createSelector(makeSelectTotalItemsForChannel(uri), makeSelectTotalClaimsInChannelSearch(uri), (claimsInChannel, claimsInSearch) => {
if (claimsInChannel && claimsInSearch) {
return claimsInChannel - claimsInSearch;
} else return 0;
});
const makeSelectClaimIsNsfw = uri => reselect.createSelector(makeSelectClaimForUri(uri),
// Eventually these will come from some list of tags that are considered adult
// Or possibly come from users settings of what tags they want to hide
@ -5495,6 +5501,7 @@ exports.makeSelectMetadataItemForUri = makeSelectMetadataItemForUri;
exports.makeSelectMyStreamUrlsForPage = makeSelectMyStreamUrlsForPage;
exports.makeSelectNsfwCountForChannel = makeSelectNsfwCountForChannel;
exports.makeSelectNsfwCountFromUris = makeSelectNsfwCountFromUris;
exports.makeSelectOmittedCountForChannel = makeSelectOmittedCountForChannel;
exports.makeSelectPendingByUri = makeSelectPendingByUri;
exports.makeSelectPermanentUrlForUri = makeSelectPermanentUrlForUri;
exports.makeSelectPublishFormValue = makeSelectPublishFormValue;

View file

@ -175,6 +175,7 @@ export {
makeSelectTotalPagesForChannel,
makeSelectNsfwCountFromUris,
makeSelectNsfwCountForChannel,
makeSelectOmittedCountForChannel,
makeSelectClaimIsNsfw,
makeSelectRecommendedContentForUri,
makeSelectFirstRecommendedFileForUri,

View file

@ -466,6 +466,18 @@ export const makeSelectNsfwCountForChannel = (uri: string) =>
}
);
export const makeSelectOmittedCountForChannel = (uri: string) =>
createSelector(
makeSelectTotalItemsForChannel(uri),
makeSelectTotalClaimsInChannelSearch(uri),
(claimsInChannel, claimsInSearch) => {
if (claimsInChannel && claimsInSearch) {
return claimsInChannel - claimsInSearch;
}
else return 0;
}
);
export const makeSelectClaimIsNsfw = (uri: string): boolean =>
createSelector(
makeSelectClaimForUri(uri),