Home Reference Source

application/redux/actions/content-view-actions.js


/**
 * Action types
 */
export const CONTENT_VIEW_UPDATE = 'CONTENT_VIEW_UPDATE';
export const CONTENT_VIEW_RESET = 'CONTENT_VIEW_RESET';
export const CONTENT_VIEW_NOTIFY_NEW = 'CONTENT_VIEW_NOTIFY_NEW';
export const CONTENT_VIEW_CLEAR_NEW = 'CONTENT_VIEW_CLEAR_NEW';

/**
 * Action creators
 */
export function contentViewUpdate(params = {}) {
    return function(dispatch, getState) {
        dispatch({
            type: CONTENT_VIEW_UPDATE,
            payload: params
        });
        return Promise.resolve();
    };
};

export function contentViewReset() {
    return function(dispatch, getState) {
        dispatch({
            type: CONTENT_VIEW_RESET,
            payload: {}
        });
        return Promise.resolve();
    };
}

export function contentViewNotifyNew() {
    return function(dispatch, getState) {
        dispatch({
            type: CONTENT_VIEW_NOTIFY_NEW,
            payload: {}
        });
        return Promise.resolve();
    };
}

export function contentViewClearNotify() {
    return function(dispatch, getState) {
        dispatch({
            type: CONTENT_VIEW_CLEAR_NEW,
            payload: {}
        });
        return Promise.resolve();
    };
}