prefer title for collection name on resolve
This commit is contained in:
parent
15eebee694
commit
79519a3ea1
1 changed files with 6 additions and 7 deletions
|
@ -40,11 +40,9 @@ export const doLocalCollectionCreate = (
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export const doCollectionDelete = (
|
export const doCollectionDelete = (id: string, colKey: ?string = undefined) => (
|
||||||
id: string,
|
dispatch: Dispatch
|
||||||
colKey: ?string = undefined,
|
) => {
|
||||||
keepLocal?: boolean
|
|
||||||
) => (dispatch: Dispatch) => {
|
|
||||||
return dispatch({
|
return dispatch({
|
||||||
type: ACTIONS.COLLECTION_DELETE,
|
type: ACTIONS.COLLECTION_DELETE,
|
||||||
data: {
|
data: {
|
||||||
|
@ -219,7 +217,8 @@ export const doFetchItemsInCollections = (
|
||||||
const claim = makeSelectClaimForClaimId(collectionId)(stateAfterClaimSearch);
|
const claim = makeSelectClaimForClaimId(collectionId)(stateAfterClaimSearch);
|
||||||
|
|
||||||
const editedCollection = makeSelectEditedCollectionForId(collectionId)(stateAfterClaimSearch);
|
const editedCollection = makeSelectEditedCollectionForId(collectionId)(stateAfterClaimSearch);
|
||||||
const { name, timestamp } = claim || {};
|
const { name, timestamp, value } = claim || {};
|
||||||
|
const { title } = value;
|
||||||
const valueTypes = new Set();
|
const valueTypes = new Set();
|
||||||
const streamTypes = new Set();
|
const streamTypes = new Set();
|
||||||
|
|
||||||
|
@ -242,7 +241,7 @@ export const doFetchItemsInCollections = (
|
||||||
newCollectionItemsById[collectionId] = {
|
newCollectionItemsById[collectionId] = {
|
||||||
items,
|
items,
|
||||||
id: collectionId,
|
id: collectionId,
|
||||||
name: name,
|
name: title || name,
|
||||||
itemCount: claim.value.claims.length,
|
itemCount: claim.value.claims.length,
|
||||||
type: isPlaylist ? 'playlist' : 'collection',
|
type: isPlaylist ? 'playlist' : 'collection',
|
||||||
updatedAt: timestamp,
|
updatedAt: timestamp,
|
||||||
|
|
Loading…
Reference in a new issue