fix font size keyboard shortcuts

This commit is contained in:
Guillermo Rauch 2016-07-13 22:37:46 -07:00
parent 2b0ca5a75b
commit 06be0e2fb1
4 changed files with 7 additions and 7 deletions

View file

@ -24,10 +24,10 @@ export function increaseFontSize () {
effect () {
const state = getState();
const old = state.ui.fontSizeOverride || state.ui.fontSize;
const size = old + 1;
const value = old + 1;
dispatch({
type: UI_FONT_SIZE_SET,
size
value
});
}
});
@ -41,10 +41,10 @@ export function decreaseFontSize () {
effect () {
const state = getState();
const old = state.ui.fontSizeOverride || state.ui.fontSize;
const size = old + 1;
const value = old - 1;
dispatch({
type: UI_FONT_SIZE_SET,
size
value
});
}
});

View file

@ -10,7 +10,7 @@ const NotificationsContainer = connect(
const state_ = {};
if (notifications.font) {
const fontSize = ui.fontSize;
const fontSize = ui.fontSizeOverride || ui.fontSize;
Object.assign(state_, {
fontShowing: true,

View file

@ -78,7 +78,7 @@ rpc.on('increase fontSize req', () => {
});
rpc.on('decrease fontSize req', () => {
store_.dispatch(uiActions.resetFontSize());
store_.dispatch(uiActions.decreaseFontSize());
});
rpc.on('move left req', () => {

View file

@ -183,7 +183,7 @@ const reducer = (state = initial, action) => {
break;
case UI_FONT_SIZE_SET:
state_ = state.set('fontSizeOverride', state.value);
state_ = state.set('fontSizeOverride', action.value);
break;
case UI_FONT_SIZE_RESET: