Fix #798: fix action dispatch order in doFetchItemsInCollections

We need to store the resolved claims first before marking COLLECTION_ITEMS_RESOLVE_COMPLETED, otherwise the GUI still sees undefined claims.

798 just accidentally flipped the order due to refactoring, I believe. It's now back to original.
This commit is contained in:
infinite-persistence 2022-03-12 20:17:30 +08:00 committed by Thomas Zarebczan
parent 5a1ad487f3
commit b9d392526c

View file

@ -272,6 +272,11 @@ export const doFetchItemsInCollections = (
});
});
dispatch({
type: ACTIONS.RESOLVE_URIS_COMPLETED,
data: { resolveInfo },
});
dispatch({
type: ACTIONS.COLLECTION_ITEMS_RESOLVE_COMPLETED,
data: {
@ -279,11 +284,6 @@ export const doFetchItemsInCollections = (
failedCollectionIds: invalidCollectionIds,
},
});
dispatch({
type: ACTIONS.RESOLVE_URIS_COMPLETED,
data: { resolveInfo },
});
};
function processResult(result, resolveInfo = {}, checkReposts = false) {