From d71b9a351ca8a834bbc03f581ba5ce5d9f1f7daf Mon Sep 17 00:00:00 2001 From: zeppi Date: Thu, 3 Jun 2021 14:03:33 -0400 Subject: [PATCH] fix sync bringing back unpublished --- dist/bundle.es.js | 7 ++++--- src/redux/actions/claims.js | 12 ++++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/dist/bundle.es.js b/dist/bundle.es.js index 10ea0e8..7839fd2 100644 --- a/dist/bundle.es.js +++ b/dist/bundle.es.js @@ -4387,14 +4387,15 @@ function doCollectionPublish(options, localId) { // move unpublished collection to pending collection with new publish id // recent publish won't resolve this second. handle it in checkPending { - type: COLLECTION_PENDING, - data: { localId: localId, claimId: collectionClaim.claim_id } - }, { type: UPDATE_PENDING_CLAIMS, data: { claims: [collectionClaim] } })); + dispatch({ + type: COLLECTION_PENDING, + data: { localId: localId, claimId: collectionClaim.claim_id } + }); dispatch(doCheckPendingClaims()); dispatch(doFetchCollectionListMine(1, 10)); return resolve(collectionClaim); diff --git a/src/redux/actions/claims.js b/src/redux/actions/claims.js index 56cc212..ca39046 100644 --- a/src/redux/actions/claims.js +++ b/src/redux/actions/claims.js @@ -79,7 +79,7 @@ export function doResolveUris( const collectionIds: Array = []; return Lbry.resolve({ urls: urisToResolve, ...options }).then( - async(result: ResolveResponse) => { + async (result: ResolveResponse) => { let repostedResults = {}; const collectionClaimIdsToResolve = []; const repostsToResolve = []; @@ -653,7 +653,7 @@ export function doClaimSearch( } ) { const query = createNormalizedClaimSearchKey(options); - return async(dispatch: Dispatch) => { + return async (dispatch: Dispatch) => { dispatch({ type: ACTIONS.CLAIM_SEARCH_STARTED, data: { query: query }, @@ -802,10 +802,6 @@ export function doCollectionPublish( }, // move unpublished collection to pending collection with new publish id // recent publish won't resolve this second. handle it in checkPending - { - type: ACTIONS.COLLECTION_PENDING, - data: { localId: localId, claimId: collectionClaim.claim_id }, - }, { type: ACTIONS.UPDATE_PENDING_CLAIMS, data: { @@ -814,6 +810,10 @@ export function doCollectionPublish( } ) ); + dispatch({ + type: ACTIONS.COLLECTION_PENDING, + data: { localId: localId, claimId: collectionClaim.claim_id }, + }); dispatch(doCheckPendingClaims()); dispatch(doFetchCollectionListMine(1, 10)); return resolve(collectionClaim);