From d3c621ed1265645cf18cbea7bb10ee8801a71fe1 Mon Sep 17 00:00:00 2001 From: 6ea86b96 <6ea86b96@gmail.com> Date: Tue, 11 Jul 2017 14:44:45 +0700 Subject: [PATCH] use _SUCCEEDED for abandom claim and file list action types --- ui/js/actions/file_info.js | 4 ++-- ui/js/constants/action_types.js | 4 ++-- ui/js/reducers/claims.js | 2 +- ui/js/reducers/file_info.js | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ui/js/actions/file_info.js b/ui/js/actions/file_info.js index eb4a6753f..b36cb784e 100644 --- a/ui/js/actions/file_info.js +++ b/ui/js/actions/file_info.js @@ -57,7 +57,7 @@ export function doFileList() { lbry.file_list().then(fileInfos => { dispatch({ - type: types.FILE_LIST_COMPLETED, + type: types.FILE_LIST_SUCCEEDED, data: { fileInfos, }, @@ -107,7 +107,7 @@ export function doDeleteFile(outpoint, deleteFromComputer, abandonClaim) { const success = setTimeout( () => { dispatch({ - type: types.ABANDON_CLAIM_COMPLETED, + type: types.ABANDON_CLAIM_SUCCEEDED, data: { claimId: fileInfo.claim_id, }, diff --git a/ui/js/constants/action_types.js b/ui/js/constants/action_types.js index 457761441..7d38568f3 100644 --- a/ui/js/constants/action_types.js +++ b/ui/js/constants/action_types.js @@ -47,7 +47,7 @@ export const FETCH_CLAIM_LIST_MINE_STARTED = "FETCH_CLAIM_LIST_MINE_STARTED"; export const FETCH_CLAIM_LIST_MINE_COMPLETED = "FETCH_CLAIM_LIST_MINE_COMPLETED"; export const FILE_LIST_STARTED = "FILE_LIST_STARTED"; -export const FILE_LIST_COMPLETED = "FILE_LIST_COMPLETED"; +export const FILE_LIST_SUCCEEDED = "FILE_LIST_SUCCEEDED"; export const FETCH_FILE_INFO_STARTED = "FETCH_FILE_INFO_STARTED"; export const FETCH_FILE_INFO_COMPLETED = "FETCH_FILE_INFO_COMPLETED"; export const FETCH_COST_INFO_STARTED = "FETCH_COST_INFO_STARTED"; @@ -63,7 +63,7 @@ export const FETCH_AVAILABILITY_STARTED = "FETCH_AVAILABILITY_STARTED"; export const FETCH_AVAILABILITY_COMPLETED = "FETCH_AVAILABILITY_COMPLETED"; export const FILE_DELETE = "FILE_DELETE"; export const ABANDON_CLAIM_STARTED = "ABANDON_CLAIM_STARTED"; -export const ABANDON_CLAIM_COMPLETED = "ABANDON_CLAIM_COMPLETED"; +export const ABANDON_CLAIM_SUCCEEDED = "ABANDON_CLAIM_SUCCEEDED"; export const FETCH_CHANNEL_LIST_MINE_STARTED = "FETCH_CHANNEL_LIST_MINE_STARTED"; export const FETCH_CHANNEL_LIST_MINE_COMPLETED = diff --git a/ui/js/reducers/claims.js b/ui/js/reducers/claims.js index 2470e5f9c..adc0eb2ed 100644 --- a/ui/js/reducers/claims.js +++ b/ui/js/reducers/claims.js @@ -122,7 +122,7 @@ reducers[types.ABANDON_CLAIM_STARTED] = function(state, action) { }); }; -reducers[types.ABANDON_CLAIM_COMPLETED] = function(state, action) { +reducers[types.ABANDON_CLAIM_SUCCEEDED] = function(state, action) { const { claimId } = action.data; const myClaims = new Set(state.myClaims); const byId = Object.assign({}, state.byId); diff --git a/ui/js/reducers/file_info.js b/ui/js/reducers/file_info.js index c9e2817b3..500fbdf82 100644 --- a/ui/js/reducers/file_info.js +++ b/ui/js/reducers/file_info.js @@ -10,7 +10,7 @@ reducers[types.FILE_LIST_STARTED] = function(state, action) { }); }; -reducers[types.FILE_LIST_COMPLETED] = function(state, action) { +reducers[types.FILE_LIST_SUCCEEDED] = function(state, action) { const { fileInfos } = action.data; const newByOutpoint = Object.assign({}, state.byOutpoint); const pendingByOutpoint = Object.assign({}, state.pendingByOutpoint);