1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

Merge pull request #1016 from PaulRosset/clear-message-HotKeyTab

ClearMessage notification HotKeyTab
This commit is contained in:
Kazu Yokomizo
2017-10-26 13:53:43 +09:00
committed by GitHub

View File

@@ -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