Merge pull request #60 from lbryio/save-channels-claims-by-uri
save channel claim data to claimsByUri
This commit is contained in:
commit
303b726a3a
2 changed files with 7 additions and 1 deletions
5
dist/bundle.js
vendored
5
dist/bundle.js
vendored
|
@ -5001,12 +5001,14 @@ reducers[ACTIONS.FETCH_CHANNEL_CLAIMS_COMPLETED] = function (state, action) {
|
|||
var currentPageClaimIds = [];
|
||||
var byId = Object.assign({}, state.byId);
|
||||
var fetchingChannelClaims = Object.assign({}, state.fetchingChannelClaims);
|
||||
var claimsByUri = Object.assign({}, state.claimsByUri);
|
||||
|
||||
if (claims !== undefined) {
|
||||
claims.forEach(function (claim) {
|
||||
allClaimIds.add(claim.claim_id);
|
||||
currentPageClaimIds.push(claim.claim_id);
|
||||
byId[claim.claim_id] = claim;
|
||||
claimsByUri['lbry://' + claim.name + '#' + claim.claim_id] = claim.claim_id;
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -5018,7 +5020,8 @@ reducers[ACTIONS.FETCH_CHANNEL_CLAIMS_COMPLETED] = function (state, action) {
|
|||
return Object.assign({}, state, {
|
||||
claimsByChannel: claimsByChannel,
|
||||
byId: byId,
|
||||
fetchingChannelClaims: fetchingChannelClaims
|
||||
fetchingChannelClaims: fetchingChannelClaims,
|
||||
claimsByUri: claimsByUri
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -127,12 +127,14 @@ reducers[ACTIONS.FETCH_CHANNEL_CLAIMS_COMPLETED] = (state, action) => {
|
|||
const currentPageClaimIds = [];
|
||||
const byId = Object.assign({}, state.byId);
|
||||
const fetchingChannelClaims = Object.assign({}, state.fetchingChannelClaims);
|
||||
const claimsByUri = Object.assign({}, state.claimsByUri);
|
||||
|
||||
if (claims !== undefined) {
|
||||
claims.forEach(claim => {
|
||||
allClaimIds.add(claim.claim_id);
|
||||
currentPageClaimIds.push(claim.claim_id);
|
||||
byId[claim.claim_id] = claim;
|
||||
claimsByUri[`lbry://${claim.name}#${claim.claim_id}`] = claim.claim_id;
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -145,6 +147,7 @@ reducers[ACTIONS.FETCH_CHANNEL_CLAIMS_COMPLETED] = (state, action) => {
|
|||
claimsByChannel,
|
||||
byId,
|
||||
fetchingChannelClaims,
|
||||
claimsByUri,
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue