add doClearPurchasedUriSuccess

This commit is contained in:
Sean Yesmunt 2020-05-18 22:13:18 -04:00
parent f660f1070c
commit 4a59abf30c
7 changed files with 24 additions and 13 deletions

17
dist/bundle.es.js vendored
View file

@ -191,7 +191,7 @@ const SET_FILE_LIST_SORT = 'SET_FILE_LIST_SORT';
const PURCHASE_URI_STARTED = 'PURCHASE_URI_STARTED'; const PURCHASE_URI_STARTED = 'PURCHASE_URI_STARTED';
const PURCHASE_URI_COMPLETED = 'PURCHASE_URI_COMPLETED'; const PURCHASE_URI_COMPLETED = 'PURCHASE_URI_COMPLETED';
const PURCHASE_URI_FAILED = 'PURCHASE_URI_FAILED'; const PURCHASE_URI_FAILED = 'PURCHASE_URI_FAILED';
const DELETE_PURCHASED_URI = 'DELETE_PURCHASED_URI'; const CLEAR_PURCHASED_URI_SUCCESS = 'CLEAR_PURCHASED_URI_SUCCESS';
// Search // Search
const SEARCH_START = 'SEARCH_START'; const SEARCH_START = 'SEARCH_START';
@ -470,7 +470,7 @@ var action_types = /*#__PURE__*/Object.freeze({
PURCHASE_URI_STARTED: PURCHASE_URI_STARTED, PURCHASE_URI_STARTED: PURCHASE_URI_STARTED,
PURCHASE_URI_COMPLETED: PURCHASE_URI_COMPLETED, PURCHASE_URI_COMPLETED: PURCHASE_URI_COMPLETED,
PURCHASE_URI_FAILED: PURCHASE_URI_FAILED, PURCHASE_URI_FAILED: PURCHASE_URI_FAILED,
DELETE_PURCHASED_URI: DELETE_PURCHASED_URI, CLEAR_PURCHASED_URI_SUCCESS: CLEAR_PURCHASED_URI_SUCCESS,
SEARCH_START: SEARCH_START, SEARCH_START: SEARCH_START,
SEARCH_SUCCESS: SEARCH_SUCCESS, SEARCH_SUCCESS: SEARCH_SUCCESS,
SEARCH_FAIL: SEARCH_FAIL, SEARCH_FAIL: SEARCH_FAIL,
@ -4030,10 +4030,9 @@ function doPurchaseUri(uri, costInfo, saveFile = true, onSuccess) {
}; };
} }
function doDeletePurchasedUri(uri) { function doClearPurchasedUriSuccess() {
return { return {
type: DELETE_PURCHASED_URI, type: CLEAR_PURCHASED_URI_SUCCESS
data: { uri }
}; };
} }
@ -5731,6 +5730,12 @@ reducers[PURCHASE_URI_FAILED] = state => {
}); });
}; };
reducers[CLEAR_PURCHASED_URI_SUCCESS] = state => {
return _extends$9({}, state, {
purchaseUriSuccess: false
});
};
function claimsReducer(state = defaultState, action) { function claimsReducer(state = defaultState, action) {
const handler = reducers[action.type]; const handler = reducers[action.type];
if (handler) return handler(state, action); if (handler) return handler(state, action);
@ -6937,6 +6942,7 @@ exports.doCheckPublishNameAvailability = doCheckPublishNameAvailability;
exports.doCheckReflectingFiles = doCheckReflectingFiles; exports.doCheckReflectingFiles = doCheckReflectingFiles;
exports.doClaimSearch = doClaimSearch; exports.doClaimSearch = doClaimSearch;
exports.doClearPublish = doClearPublish; exports.doClearPublish = doClearPublish;
exports.doClearPurchasedUriSuccess = doClearPurchasedUriSuccess;
exports.doClearRepostError = doClearRepostError; exports.doClearRepostError = doClearRepostError;
exports.doClearSupport = doClearSupport; exports.doClearSupport = doClearSupport;
exports.doCommentAbandon = doCommentAbandon; exports.doCommentAbandon = doCommentAbandon;
@ -6945,7 +6951,6 @@ exports.doCommentHide = doCommentHide;
exports.doCommentList = doCommentList; exports.doCommentList = doCommentList;
exports.doCommentUpdate = doCommentUpdate; exports.doCommentUpdate = doCommentUpdate;
exports.doCreateChannel = doCreateChannel; exports.doCreateChannel = doCreateChannel;
exports.doDeletePurchasedUri = doDeletePurchasedUri;
exports.doDeleteTag = doDeleteTag; exports.doDeleteTag = doDeleteTag;
exports.doDismissError = doDismissError; exports.doDismissError = doDismissError;
exports.doDismissToast = doDismissToast; exports.doDismissToast = doDismissToast;

View file

@ -70,7 +70,7 @@ declare type PurchaseUriStarted = {
}; };
declare type DeletePurchasedUri = { declare type DeletePurchasedUri = {
type: ACTIONS.DELETE_PURCHASED_URI, type: ACTIONS.CLEAR_PURCHASED_URI_SUCCESS,
data: { data: {
uri: string, uri: string,
}, },

2
flow-typed/File.js vendored
View file

@ -70,7 +70,7 @@ declare type PurchaseUriStarted = {
}; };
declare type DeletePurchasedUri = { declare type DeletePurchasedUri = {
type: ACTIONS.DELETE_PURCHASED_URI, type: ACTIONS.CLEAR_PURCHASED_URI_SUCCESS,
data: { data: {
uri: string, uri: string,
}, },

View file

@ -168,7 +168,7 @@ export const SET_FILE_LIST_SORT = 'SET_FILE_LIST_SORT';
export const PURCHASE_URI_STARTED = 'PURCHASE_URI_STARTED'; export const PURCHASE_URI_STARTED = 'PURCHASE_URI_STARTED';
export const PURCHASE_URI_COMPLETED = 'PURCHASE_URI_COMPLETED'; export const PURCHASE_URI_COMPLETED = 'PURCHASE_URI_COMPLETED';
export const PURCHASE_URI_FAILED = 'PURCHASE_URI_FAILED'; export const PURCHASE_URI_FAILED = 'PURCHASE_URI_FAILED';
export const DELETE_PURCHASED_URI = 'DELETE_PURCHASED_URI'; export const CLEAR_PURCHASED_URI_SUCCESS = 'CLEAR_PURCHASED_URI_SUCCESS';
// Search // Search
export const SEARCH_START = 'SEARCH_START'; export const SEARCH_START = 'SEARCH_START';

View file

@ -78,7 +78,7 @@ export {
doPurchaseList, doPurchaseList,
} from 'redux/actions/claims'; } from 'redux/actions/claims';
export { doDeletePurchasedUri, doPurchaseUri, doFileGet } from 'redux/actions/file'; export { doClearPurchasedUriSuccess, doPurchaseUri, doFileGet } from 'redux/actions/file';
export { export {
doFetchFileInfo, doFetchFileInfo,

View file

@ -123,9 +123,8 @@ export function doPurchaseUri(
}; };
} }
export function doDeletePurchasedUri(uri: string) { export function doClearPurchasedUriSuccess() {
return { return {
type: ACTIONS.DELETE_PURCHASED_URI, type: ACTIONS.CLEAR_PURCHASED_URI_SUCCESS,
data: { uri },
}; };
} }

View file

@ -733,6 +733,13 @@ reducers[ACTIONS.PURCHASE_URI_FAILED] = (state: State): State => {
}; };
}; };
reducers[ACTIONS.CLEAR_PURCHASED_URI_SUCCESS] = (state: State): State => {
return {
...state,
purchaseUriSuccess: false,
};
};
export function claimsReducer(state: State = defaultState, action: any) { export function claimsReducer(state: State = defaultState, action: any) {
const handler = reducers[action.type]; const handler = reducers[action.type];
if (handler) return handler(state, action); if (handler) return handler(state, action);