mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-11-11 17:00:44 +08:00
undo(prefs): atom.keymaps does not implement unsubscribe
This commit is contained in:
parent
683ef61c1f
commit
d28e84d95a
1 changed files with 2 additions and 5 deletions
|
|
@ -25,14 +25,11 @@ class PreferencesKeymaps extends React.Component
|
||||||
@_loadTemplates()
|
@_loadTemplates()
|
||||||
|
|
||||||
componentDidMount: =>
|
componentDidMount: =>
|
||||||
@_mounted = true
|
@_disposable = atom.keymaps.onDidReloadKeymap =>
|
||||||
atom.keymaps.onDidReloadKeymap =>
|
|
||||||
# Temporary fix for https://github.com/atom/atom-keymap/issues/101
|
|
||||||
return unless @_mounted
|
|
||||||
@setState(bindings: @_getStateFromKeymaps())
|
@setState(bindings: @_getStateFromKeymaps())
|
||||||
|
|
||||||
componentWillUnmount: =>
|
componentWillUnmount: =>
|
||||||
@_mounted = false
|
@_disposable.dispose()
|
||||||
|
|
||||||
_loadTemplates: =>
|
_loadTemplates: =>
|
||||||
templatesDir = path.join(atom.getLoadSettings().resourcePath, 'keymaps', 'templates')
|
templatesDir = path.join(atom.getLoadSettings().resourcePath, 'keymaps', 'templates')
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue