mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-01 05:06:53 +08:00
fix(templates): Unregister preferences tab when disabled
This commit is contained in:
parent
30c58e90a6
commit
013d50a26b
2 changed files with 3 additions and 3 deletions
|
@ -20,7 +20,7 @@ module.exports = {
|
|||
deactivate() {
|
||||
ComponentRegistry.unregister(TemplatePicker);
|
||||
ComponentRegistry.unregister(TemplateStatusBar);
|
||||
PreferencesUIStore.unregisterPreferencesTab(this.preferencesTab.sectionId);
|
||||
PreferencesUIStore.unregisterPreferencesTab(this.preferencesTab.tabId);
|
||||
ExtensionRegistry.Composer.unregister(TemplateComposerExtension);
|
||||
},
|
||||
|
||||
|
|
|
@ -56,8 +56,8 @@ class PreferencesUIStore extends NylasStore
|
|||
@_selection = @_selection.set('tabId', tabItem.tabId)
|
||||
@_triggerDebounced()
|
||||
|
||||
unregisterPreferencesTab: (tabId) ->
|
||||
@_tabs = @_tabs.filter (s) => s.tabId isnt tabId
|
||||
unregisterPreferencesTab: (tabItemOrId) ->
|
||||
@_tabs = @_tabs.filter (s) -> s.tabId isnt tabItemOrId and s isnt tabItemOrId
|
||||
@_triggerDebounced()
|
||||
|
||||
module.exports = new PreferencesUIStore()
|
||||
|
|
Loading…
Reference in a new issue