Change rLists selector

This commit is contained in:
saltrafael 2021-07-23 11:19:58 -03:00 committed by jessopb
parent 54ca8c4320
commit 9ebfc927d0
2 changed files with 5 additions and 15 deletions

7
dist/bundle.es.js vendored
View file

@ -3697,11 +3697,8 @@ const makeSelectCollectionForId = id => reselect.createSelector(selectBuiltinCol
return collection; return collection;
}); });
const makeSelectClaimUrlInCollection = url => reselect.createSelector(selectBuiltinCollections, selectResolvedCollections, selectMyUnpublishedCollections, selectMyEditedCollections, selectPendingCollections, selectMyCollectionIds, (bLists, rLists, uLists, eLists, pLists, myIds) => { const makeSelectClaimUrlInCollection = url => reselect.createSelector(selectBuiltinCollections, selectMyPublishedCollections, selectMyUnpublishedCollections, selectMyEditedCollections, selectPendingCollections, (bLists, myRLists, uLists, eLists, pLists) => {
Object.entries(rLists).filter(([key, val]) => myIds.includes(key) && const collections = [bLists, uLists, eLists, myRLists, pLists];
// $FlowFixMe
!pLists[key]);
const collections = [bLists, uLists, eLists, rLists, pLists];
const itemsInCollections = []; const itemsInCollections = [];
collections.map(list => { collections.map(list => {
Object.entries(list).forEach(([key, value]) => { Object.entries(list).forEach(([key, value]) => {

View file

@ -166,19 +166,12 @@ export const makeSelectCollectionForId = (id: string) =>
export const makeSelectClaimUrlInCollection = (url: string) => export const makeSelectClaimUrlInCollection = (url: string) =>
createSelector( createSelector(
selectBuiltinCollections, selectBuiltinCollections,
selectResolvedCollections, selectMyPublishedCollections,
selectMyUnpublishedCollections, selectMyUnpublishedCollections,
selectMyEditedCollections, selectMyEditedCollections,
selectPendingCollections, selectPendingCollections,
selectMyCollectionIds, (bLists, myRLists, uLists, eLists, pLists) => {
(bLists, rLists, uLists, eLists, pLists, myIds) => { const collections = [bLists, uLists, eLists, myRLists, pLists];
Object.entries(rLists).filter(
([key, val]) =>
myIds.includes(key) &&
// $FlowFixMe
!pLists[key]
);
const collections = [bLists, uLists, eLists, rLists, pLists];
const itemsInCollections = []; const itemsInCollections = [];
collections.map(list => { collections.map(list => {
Object.entries(list).forEach(([key, value]) => { Object.entries(list).forEach(([key, value]) => {