PLT-3268 Made keyboard shortcuts open/close account settings and channel switcher (#3635)

* made keyboard shortcuts open/close account settings and channel switcher

* made booleans toggle
This commit is contained in:
David Lu
2016-07-20 13:01:31 -08:00
committed by Corey Hulen
parent 86d496c9b7
commit 537d647846
2 changed files with 2 additions and 4 deletions
+1 -3
View File
@@ -180,9 +180,7 @@ export default class Navbar extends React.Component {
showChannelSwitchModal(e) {
if (Utils.cmdOrCtrlPressed(e) && e.keyCode === Constants.KeyCodes.K) {
e.preventDefault();
this.setState({
showChannelSwitchModal: true
});
this.setState({showChannelSwitchModal: !this.state.showChannelSwitchModal});
}
}
+1 -1
View File
@@ -77,7 +77,7 @@ export default class NavbarDropdown extends React.Component {
openAccountSettings(e) {
if (Utils.cmdOrCtrlPressed(e) && e.shiftKey && e.keyCode === Constants.KeyCodes.A) {
e.preventDefault();
this.setState({showUserSettingsModal: true});
this.setState({showUserSettingsModal: !this.state.showUserSettingsModal});
}
}