mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-11-06 22:46:07 +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()
|
||||
|
||||
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…
Add table
Reference in a new issue