Merge pull request #336 from infinite-persistence/ip4385--publish-status
Publish: Handle reflecting-state not updated correctly.
This commit is contained in:
commit
0be1b75343
2 changed files with 30 additions and 26 deletions
28
dist/bundle.es.js
vendored
28
dist/bundle.es.js
vendored
|
@ -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 () {
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue