add download canceled to the file_info reducer
This commit is contained in:
parent
4ee6c376e5
commit
22519cfc42
2 changed files with 23 additions and 0 deletions
12
dist/bundle.js
vendored
12
dist/bundle.js
vendored
|
@ -5469,6 +5469,18 @@ reducers[ACTIONS.DOWNLOADING_PROGRESSED] = function (state, action) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
reducers[ACTIONS.DOWNLOADING_CANCELED] = function (state, action) {
|
||||||
|
var outpoint = action.data.outpoint;
|
||||||
|
|
||||||
|
|
||||||
|
var newDownloading = Object.assign({}, state.downloadingByOutpoint);
|
||||||
|
delete newDownloading[outpoint];
|
||||||
|
|
||||||
|
return Object.assign({}, state, {
|
||||||
|
downloadingByOutpoint: newDownloading
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.DOWNLOADING_COMPLETED] = function (state, action) {
|
reducers[ACTIONS.DOWNLOADING_COMPLETED] = function (state, action) {
|
||||||
var _action$data4 = action.data,
|
var _action$data4 = action.data,
|
||||||
outpoint = _action$data4.outpoint,
|
outpoint = _action$data4.outpoint,
|
||||||
|
|
|
@ -85,6 +85,17 @@ reducers[ACTIONS.DOWNLOADING_PROGRESSED] = (state, action) => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
reducers[ACTIONS.DOWNLOADING_CANCELED] = (state, action) => {
|
||||||
|
const { outpoint } = action.data;
|
||||||
|
|
||||||
|
const newDownloading = Object.assign({}, state.downloadingByOutpoint);
|
||||||
|
delete newDownloading[outpoint];
|
||||||
|
|
||||||
|
return Object.assign({}, state, {
|
||||||
|
downloadingByOutpoint: newDownloading,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.DOWNLOADING_COMPLETED] = (state, action) => {
|
reducers[ACTIONS.DOWNLOADING_COMPLETED] = (state, action) => {
|
||||||
const { outpoint, fileInfo } = action.data;
|
const { outpoint, fileInfo } = action.data;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue