Small fix for last used collection when it's a published collection.
This commit is contained in:
parent
ca1d0e71b7
commit
aa008d8a61
1 changed files with 4 additions and 0 deletions
|
@ -74,6 +74,7 @@ const collectionsReducer = handleActions(
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
[collectionKey]: newList,
|
[collectionKey]: newList,
|
||||||
|
lastUsedCollection: isDeletingLastUsedCollection ? undefined : lastUsedCollection,
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
if (newEditList[id]) {
|
if (newEditList[id]) {
|
||||||
|
@ -117,6 +118,7 @@ const collectionsReducer = handleActions(
|
||||||
edited: newEditList,
|
edited: newEditList,
|
||||||
unpublished: newUnpublishedList,
|
unpublished: newUnpublishedList,
|
||||||
pending: newPendingList,
|
pending: newPendingList,
|
||||||
|
lastUsedCollection: newPendingList[claimId],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -128,6 +130,7 @@ const collectionsReducer = handleActions(
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
[collectionKey]: { ...lists, [id]: collection },
|
[collectionKey]: { ...lists, [id]: collection },
|
||||||
|
lastUsedCollection: collection,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -136,6 +139,7 @@ const collectionsReducer = handleActions(
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
edited: { ...lists, [id]: collection },
|
edited: { ...lists, [id]: collection },
|
||||||
|
lastUsedCollection: collection,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
const { unpublished: lists } = state;
|
const { unpublished: lists } = state;
|
||||||
|
|
Loading…
Reference in a new issue