diff --git a/browser/main/modals/PreferencesModal/HotkeyTab.js b/browser/main/modals/PreferencesModal/HotkeyTab.js index edbd06a55..18ac31ff7 100644 --- a/browser/main/modals/PreferencesModal/HotkeyTab.js +++ b/browser/main/modals/PreferencesModal/HotkeyTab.js @@ -3,6 +3,7 @@ import CSSModules from 'browser/lib/CSSModules' import styles from './ConfigTab.styl' import ConfigManager from 'browser/main/lib/ConfigManager' import store from 'browser/main/store' +import _ from 'lodash' const electron = require('electron') const ipc = electron.ipcRenderer @@ -50,6 +51,7 @@ class HotkeyTab extends React.Component { type: 'SET_UI', config: newConfig }) + this.clearMessage() } handleHintToggleButtonClick (e) { @@ -69,6 +71,14 @@ class HotkeyTab extends React.Component { }) } + clearMessage () { + _.debounce(() => { + this.setState({ + keymapAlert: null + }) + }, 2000)() + } + render () { let keymapAlert = this.state.keymapAlert let keymapAlertElement = keymapAlert != null