Merge pull request #86 from lbryio/download-canceled
add download canceled to the file_info reducer
This commit is contained in:
commit
997027fae2
2 changed files with 23 additions and 0 deletions
12
dist/bundle.js
vendored
12
dist/bundle.js
vendored
|
@ -5571,6 +5571,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) {
|
||||
var _action$data4 = action.data,
|
||||
outpoint = _action$data4.outpoint,
|
||||
|
|
|
@ -88,6 +88,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) => {
|
||||
const { outpoint, fileInfo } = action.data;
|
||||
|
||||
|
|
Loading…
Reference in a new issue