Return false from socket handlers to not dispatch action
This commit is contained in:
parent
a4fe18c0f0
commit
a33157ff84
8 changed files with 141 additions and 126 deletions
|
@ -69,6 +69,7 @@ export const socket = createSocketActions([
|
|||
'channels',
|
||||
'channel_forward',
|
||||
'channel_search',
|
||||
'connected',
|
||||
'connection_update',
|
||||
'error',
|
||||
'features',
|
||||
|
@ -78,6 +79,7 @@ export const socket = createSocketActions([
|
|||
'nick_fail',
|
||||
'nick',
|
||||
'part',
|
||||
'kick',
|
||||
'pm',
|
||||
'quit',
|
||||
'search',
|
||||
|
|
|
@ -37,6 +37,10 @@ export default createReducer(initialState, {
|
|||
}
|
||||
},
|
||||
|
||||
[actions.socket.CONNECTED](state, { connected }) {
|
||||
state.connected = connected;
|
||||
},
|
||||
|
||||
[actions.UPDATE_MESSAGE_HEIGHT](state, action) {
|
||||
state.wrapWidth = action.wrapWidth;
|
||||
state.charWidth = action.charWidth;
|
||||
|
@ -52,10 +56,6 @@ export function appSet(key, value) {
|
|||
};
|
||||
}
|
||||
|
||||
export function setConnected(connected) {
|
||||
return appSet('connected', connected);
|
||||
}
|
||||
|
||||
export function setCharWidth(width) {
|
||||
return appSet('charWidth', width);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue