Merge pull request #336 from infinite-persistence/ip4385--publish-status

Publish: Handle reflecting-state not updated correctly.
This commit is contained in:
Sean Yesmunt 2020-07-10 10:04:23 -04:00 committed by GitHub
commit 0be1b75343
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 26 deletions

28
dist/bundle.es.js vendored
View file

@ -4758,19 +4758,21 @@ const doCheckReflectingFiles = () => (dispatch, getState) => {
Promise.all(promises).then(function (results) {
results.forEach(function (res) {
const fileListItem = res.items[0];
const fileClaimId = fileListItem.claim_id;
const {
is_fully_reflected: done,
uploading_to_reflector: uploading,
reflector_progress: progress
} = fileListItem;
if (uploading) {
newReflectingById[fileClaimId] = {
fileListItem: fileListItem,
progress,
stalled: !done && !uploading
};
if (res.items[0]) {
const fileListItem = res.items[0];
const fileClaimId = fileListItem.claim_id;
const {
is_fully_reflected: done,
uploading_to_reflector: uploading,
reflector_progress: progress
} = fileListItem;
if (uploading) {
newReflectingById[fileClaimId] = {
fileListItem: fileListItem,
progress,
stalled: !done && !uploading
};
}
}
});
}).then(function () {

View file

@ -395,19 +395,21 @@ export const doCheckReflectingFiles = () => (dispatch: Dispatch, getState: GetSt
Promise.all(promises)
.then(results => {
results.forEach(res => {
const fileListItem = res.items[0];
const fileClaimId = fileListItem.claim_id;
const {
is_fully_reflected: done,
uploading_to_reflector: uploading,
reflector_progress: progress,
} = fileListItem;
if (uploading) {
newReflectingById[fileClaimId] = {
fileListItem: fileListItem,
progress,
stalled: !done && !uploading,
};
if (res.items[0]) {
const fileListItem = res.items[0];
const fileClaimId = fileListItem.claim_id;
const {
is_fully_reflected: done,
uploading_to_reflector: uploading,
reflector_progress: progress,
} = fileListItem;
if (uploading) {
newReflectingById[fileClaimId] = {
fileListItem: fileListItem,
progress,
stalled: !done && !uploading,
};
}
}
});
})