undoes unnec. redux wiring
This commit is contained in:
parent
9add21d831
commit
31178c761f
5 changed files with 0 additions and 18 deletions
|
@ -1,18 +1,15 @@
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
import { doCommentCreate, makeSelectClaimForUri, selectMyActiveChannelUri } from 'lbry-redux';
|
import { doCommentCreate, makeSelectClaimForUri, selectMyActiveChannelUri } from 'lbry-redux';
|
||||||
import { selectCommentsInfoAck, doAckComments } from 'redux/selectors/app';
|
|
||||||
import CommentCreate from './view';
|
import CommentCreate from './view';
|
||||||
|
|
||||||
const select = (state, props) => ({
|
const select = (state, props) => ({
|
||||||
claim: makeSelectClaimForUri(props.uri)(state),
|
claim: makeSelectClaimForUri(props.uri)(state),
|
||||||
channelUri: selectMyActiveChannelUri(state),
|
channelUri: selectMyActiveChannelUri(state),
|
||||||
acksComments: selectCommentsInfoAck(state),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const perform = dispatch => ({
|
const perform = dispatch => ({
|
||||||
createComment: params => dispatch(doCommentCreate(params)),
|
createComment: params => dispatch(doCommentCreate(params)),
|
||||||
ackComments: () => dispatch(doAckComments()),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default connect(
|
export default connect(
|
||||||
|
|
|
@ -14,7 +14,6 @@ export const DAEMON_VERSION_MATCH = 'DAEMON_VERSION_MATCH';
|
||||||
export const DAEMON_VERSION_MISMATCH = 'DAEMON_VERSION_MISMATCH';
|
export const DAEMON_VERSION_MISMATCH = 'DAEMON_VERSION_MISMATCH';
|
||||||
export const VOLUME_CHANGED = 'VOLUME_CHANGED';
|
export const VOLUME_CHANGED = 'VOLUME_CHANGED';
|
||||||
export const ADD_COMMENT = 'ADD_COMMENT';
|
export const ADD_COMMENT = 'ADD_COMMENT';
|
||||||
export const ACTIVATE_COMMENTS = 'ACTIVATE_COMMENTS';
|
|
||||||
export const SHOW_MODAL = 'SHOW_MODAL';
|
export const SHOW_MODAL = 'SHOW_MODAL';
|
||||||
export const HIDE_MODAL = 'HIDE_MODAL';
|
export const HIDE_MODAL = 'HIDE_MODAL';
|
||||||
export const CHANGE_MODALS_ALLOWED = 'CHANGE_MODALS_ALLOWED';
|
export const CHANGE_MODALS_ALLOWED = 'CHANGE_MODALS_ALLOWED';
|
||||||
|
|
|
@ -380,12 +380,6 @@ export function doClickCommentButton() {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doAckComments() {
|
|
||||||
return {
|
|
||||||
type: ACTIONS.COMMENTS_ACK,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function doConditionalAuthNavigate(newSession) {
|
export function doConditionalAuthNavigate(newSession) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
const state = getState();
|
const state = getState();
|
||||||
|
|
|
@ -36,7 +36,6 @@ export type AppState = {
|
||||||
isUpgradeAvailable: ?boolean,
|
isUpgradeAvailable: ?boolean,
|
||||||
isUpgradeSkipped: ?boolean,
|
isUpgradeSkipped: ?boolean,
|
||||||
hasClickedComment: boolean,
|
hasClickedComment: boolean,
|
||||||
commentsInfoAck: boolean,
|
|
||||||
enhancedLayout: boolean,
|
enhancedLayout: boolean,
|
||||||
searchOptionsExpanded: boolean,
|
searchOptionsExpanded: boolean,
|
||||||
};
|
};
|
||||||
|
@ -56,7 +55,6 @@ const defaultState: AppState = {
|
||||||
autoUpdateDeclined: false,
|
autoUpdateDeclined: false,
|
||||||
modalsAllowed: true,
|
modalsAllowed: true,
|
||||||
hasClickedComment: false,
|
hasClickedComment: false,
|
||||||
commentsInfoAck: false,
|
|
||||||
downloadProgress: undefined,
|
downloadProgress: undefined,
|
||||||
upgradeDownloading: undefined,
|
upgradeDownloading: undefined,
|
||||||
upgradeDownloadComplete: undefined,
|
upgradeDownloadComplete: undefined,
|
||||||
|
@ -198,7 +196,6 @@ reducers[ACTIONS.CLEAR_UPGRADE_TIMER] = state =>
|
||||||
checkUpgradeTimer: undefined,
|
checkUpgradeTimer: undefined,
|
||||||
});
|
});
|
||||||
// HERE
|
// HERE
|
||||||
reducers[ACTIONS.COMMENTS_ACK] = state => Object.assign({}, state, { commentsInfoAck: true });
|
|
||||||
|
|
||||||
reducers[ACTIONS.ADD_COMMENT] = state =>
|
reducers[ACTIONS.ADD_COMMENT] = state =>
|
||||||
Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
|
|
|
@ -29,11 +29,6 @@ export const selectHasClickedComment = createSelector(
|
||||||
state => state.hasClickedComment
|
state => state.hasClickedComment
|
||||||
);
|
);
|
||||||
|
|
||||||
export const selectCommentsInfoAck = createSelector(
|
|
||||||
selectState,
|
|
||||||
state => state.commentsInfoAck
|
|
||||||
);
|
|
||||||
|
|
||||||
export const selectRemoteVersion = createSelector(
|
export const selectRemoteVersion = createSelector(
|
||||||
selectState,
|
selectState,
|
||||||
state => state.remoteVersion
|
state => state.remoteVersion
|
||||||
|
|
Loading…
Add table
Reference in a new issue