Skip to content

Commit

Permalink
Merge pull request #1016 from PaulRosset/clear-message-HotKeyTab
Browse files Browse the repository at this point in the history
ClearMessage notification HotKeyTab
  • Loading branch information
kazup01 authored Oct 26, 2017
2 parents 7549a7b + 992f5a5 commit 8910c26
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions browser/main/modals/PreferencesModal/HotkeyTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -50,6 +51,7 @@ class HotkeyTab extends React.Component {
type: 'SET_UI',
config: newConfig
})
this.clearMessage()
}

handleHintToggleButtonClick (e) {
Expand All @@ -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
Expand Down

0 comments on commit 8910c26

Please sign in to comment.