From 79519a3ea19432fa9db368adf1b40dd5be0039a6 Mon Sep 17 00:00:00 2001 From: zeppi Date: Thu, 13 May 2021 14:06:45 -0400 Subject: [PATCH] prefer title for collection name on resolve --- src/redux/actions/collections.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/redux/actions/collections.js b/src/redux/actions/collections.js index 74b6a2d..3b44b5e 100644 --- a/src/redux/actions/collections.js +++ b/src/redux/actions/collections.js @@ -40,11 +40,9 @@ export const doLocalCollectionCreate = ( }); }; -export const doCollectionDelete = ( - id: string, - colKey: ?string = undefined, - keepLocal?: boolean -) => (dispatch: Dispatch) => { +export const doCollectionDelete = (id: string, colKey: ?string = undefined) => ( + dispatch: Dispatch +) => { return dispatch({ type: ACTIONS.COLLECTION_DELETE, data: { @@ -219,7 +217,8 @@ export const doFetchItemsInCollections = ( const claim = makeSelectClaimForClaimId(collectionId)(stateAfterClaimSearch); const editedCollection = makeSelectEditedCollectionForId(collectionId)(stateAfterClaimSearch); - const { name, timestamp } = claim || {}; + const { name, timestamp, value } = claim || {}; + const { title } = value; const valueTypes = new Set(); const streamTypes = new Set(); @@ -242,7 +241,7 @@ export const doFetchItemsInCollections = ( newCollectionItemsById[collectionId] = { items, id: collectionId, - name: name, + name: title || name, itemCount: claim.value.claims.length, type: isPlaylist ? 'playlist' : 'collection', updatedAt: timestamp,