From aa008d8a61b51ba864b882576098ffbb123dec41 Mon Sep 17 00:00:00 2001 From: Franco Montenegro Date: Thu, 24 Feb 2022 12:13:04 -0300 Subject: [PATCH] Small fix for last used collection when it's a published collection. --- ui/redux/reducers/collections.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ui/redux/reducers/collections.js b/ui/redux/reducers/collections.js index 6b8a08ab0..897771e35 100644 --- a/ui/redux/reducers/collections.js +++ b/ui/redux/reducers/collections.js @@ -74,6 +74,7 @@ const collectionsReducer = handleActions( return { ...state, [collectionKey]: newList, + lastUsedCollection: isDeletingLastUsedCollection ? undefined : lastUsedCollection, }; } else { if (newEditList[id]) { @@ -117,6 +118,7 @@ const collectionsReducer = handleActions( edited: newEditList, unpublished: newUnpublishedList, pending: newPendingList, + lastUsedCollection: newPendingList[claimId], }; }, @@ -128,6 +130,7 @@ const collectionsReducer = handleActions( return { ...state, [collectionKey]: { ...lists, [id]: collection }, + lastUsedCollection: collection, }; } @@ -136,6 +139,7 @@ const collectionsReducer = handleActions( return { ...state, edited: { ...lists, [id]: collection }, + lastUsedCollection: collection, }; } const { unpublished: lists } = state;