fix for buildURI warnings in setSubscriptionsLatest

This commit is contained in:
Akinwale Ariwodola 2019-08-26 20:32:55 +01:00
parent 3035cbdde6
commit 4c76108499
5 changed files with 1368 additions and 48 deletions

12
dist/bundle.es.js vendored
View file

@ -1603,15 +1603,17 @@ const doCheckSubscription = (subscriptionUri, shouldNotify) => (dispatch, getSta
// This allows the app to know if there has been new content since it was last set
const latestClaim = claimsInChannel[0];
const latestClaimChannel = latestClaim.signing_channel.name;
dispatch(setSubscriptionLatest({
channelName: claimsInChannel[0].channel_name,
channelName: latestClaimChannel,
uri: lbryRedux.buildURI({
channelName: claimsInChannel[0].channel_name,
claimId: claimsInChannel[0].claim_id
channelName: latestClaimChannel,
claimId: latestClaim.claim_id
}, false)
}, lbryRedux.buildURI({
claimName: claimsInChannel[0].name,
claimId: claimsInChannel[0].claim_id
claimName: latestClaim.name,
claimId: latestClaim.claim_id
}, false))); // calling FETCH_CHANNEL_CLAIMS_COMPLETED after not calling STARTED
// means it will delete a non-existant fetchingChannelClaims[uri]

17
dist/bundle.js vendored
View file

@ -2599,7 +2599,7 @@ var doCheckSubscription = function doCheckSubscription(subscriptionUri, shouldNo
var newUnread = [];
claimsInChannel.slice(0, latestIndexToNotify).forEach(function (claim) {
var uri = Object(lbry_redux__WEBPACK_IMPORTED_MODULE_3__["buildURI"])({
contentName: claim.name,
claimName: claim.name,
claimId: claim.claim_id
}, true);
var shouldDownload = shouldAutoDownload && Boolean(downloadCount < SUBSCRIPTION_DOWNLOAD_LIMIT && !claim.value.stream.metadata.fee); // Add the new content to the list of "un-read" subscriptions
@ -2620,15 +2620,17 @@ var doCheckSubscription = function doCheckSubscription(subscriptionUri, shouldNo
// This allows the app to know if there has been new content since it was last set
var latestClaim = claimsInChannel[0];
var latestClaimChannel = latestClaim.signing_channel.name;
dispatch(setSubscriptionLatest({
channelName: claimsInChannel[0].channel_name,
channelName: latestClaimChannel,
uri: Object(lbry_redux__WEBPACK_IMPORTED_MODULE_3__["buildURI"])({
channelName: claimsInChannel[0].channel_name,
claimId: claimsInChannel[0].claim_id
channelName: latestClaimChannel,
claimId: latestClaim.claim_id
}, false)
}, Object(lbry_redux__WEBPACK_IMPORTED_MODULE_3__["buildURI"])({
contentName: claimsInChannel[0].name,
claimId: claimsInChannel[0].claim_id
claimName: latestClaim.name,
claimId: latestClaim.claim_id
}, false))); // calling FETCH_CHANNEL_CLAIMS_COMPLETED after not calling STARTED
// means it will delete a non-existant fetchingChannelClaims[uri]
@ -3928,8 +3930,7 @@ reducers[lbry_redux__WEBPACK_IMPORTED_MODULE_0__["ACTIONS"].AUTHENTICATION_FAILU
reducers[lbry_redux__WEBPACK_IMPORTED_MODULE_0__["ACTIONS"].USER_FETCH_STARTED] = function (state) {
return Object.assign({}, state, {
userIsPending: true,
user: defaultState.user
userIsPending: true
});
};

View file

@ -21,7 +21,7 @@
"main": "dist/bundle.js",
"module": "dist/bundle.es.js",
"scripts": {
"build": "rollup --config",
"build": "rollup --config && webpack",
"dev": "rollup --config --watch",
"precommit": "lint-staged",
"preinstall": "yarn cache clean lbry-redux",
@ -59,7 +59,9 @@
"rollup": "^1.8.0",
"rollup-plugin-babel": "^4.3.2",
"rollup-plugin-flow": "^1.1.1",
"rollup-plugin-includepaths": "^0.2.3"
"rollup-plugin-includepaths": "^0.2.3",
"webpack": "^4.5.0",
"webpack-cli": "^3.3.7"
},
"engines": {
"yarn": "^1.3"

View file

@ -213,22 +213,21 @@ export const doCheckSubscription = (subscriptionUri: string, shouldNotify?: bool
// Set the latest piece of content for a channel
// This allows the app to know if there has been new content since it was last set
const latestClaim = claimsInChannel[0];
const latestClaimChannel = latestClaim.signing_channel.name;
dispatch(
setSubscriptionLatest(
{
channelName: claimsInChannel[0].channel_name,
channelName: latestClaimChannel,
uri: buildURI(
{
channelName: claimsInChannel[0].channel_name,
claimId: claimsInChannel[0].claim_id,
channelName: latestClaimChannel,
claimId: latestClaim.claim_id,
},
false
),
},
buildURI(
{ claimName: claimsInChannel[0].name, claimId: claimsInChannel[0].claim_id },
false
)
buildURI({ claimName: latestClaim.name, claimId: latestClaim.claim_id }, false)
)
);

1368
yarn.lock

File diff suppressed because it is too large Load diff