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