diff options
author | David Lu <david.lu@hotmail.com> | 2016-07-20 17:01:31 -0400 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2016-07-20 13:01:31 -0800 |
commit | 537d647846e596e3cc6a8d7973b94c4448924a0b (patch) | |
tree | e5f8db17965de8354e1d6424da332e233945b266 /webapp/components | |
parent | 86d496c9b72c97b905bfc23d26556032c6fa1d05 (diff) | |
download | chat-537d647846e596e3cc6a8d7973b94c4448924a0b.tar.gz chat-537d647846e596e3cc6a8d7973b94c4448924a0b.tar.bz2 chat-537d647846e596e3cc6a8d7973b94c4448924a0b.zip |
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
Diffstat (limited to 'webapp/components')
-rw-r--r-- | webapp/components/navbar.jsx | 4 | ||||
-rw-r--r-- | webapp/components/navbar_dropdown.jsx | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/webapp/components/navbar.jsx b/webapp/components/navbar.jsx index b9dea4370..1e7711d2c 100644 --- a/webapp/components/navbar.jsx +++ b/webapp/components/navbar.jsx @@ -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}); } } diff --git a/webapp/components/navbar_dropdown.jsx b/webapp/components/navbar_dropdown.jsx index 8eb0a93a9..4912b8ebf 100644 --- a/webapp/components/navbar_dropdown.jsx +++ b/webapp/components/navbar_dropdown.jsx @@ -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}); } } |