mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-10 02:03:07 +08:00
fix(composer): Do not unregister composer hot windows when a composer is closed
This commit is contained in:
parent
b8b44ce89a
commit
ddb19420fa
1 changed files with 7 additions and 6 deletions
|
@ -44,15 +44,15 @@ class ComposerWithWindowProps extends React.Component
|
|||
|
||||
module.exports =
|
||||
activate: (@state={}) ->
|
||||
atom.registerHotWindow
|
||||
windowType: 'composer'
|
||||
replenishNum: 2
|
||||
|
||||
# Register our composer as the app-wide Composer
|
||||
# Register our composer as the window-wide Composer
|
||||
ComponentRegistry.register ComposerView,
|
||||
role: 'Composer'
|
||||
|
||||
if atom.isMainWindow()
|
||||
atom.registerHotWindow
|
||||
windowType: 'composer'
|
||||
replenishNum: 2
|
||||
|
||||
ComponentRegistry.register ComposeButton,
|
||||
location: WorkspaceStore.Location.RootSidebar.Toolbar
|
||||
else
|
||||
|
@ -64,7 +64,8 @@ module.exports =
|
|||
location: WorkspaceStore.Location.Center
|
||||
|
||||
deactivate: ->
|
||||
atom.unregisterHotWindow('composer')
|
||||
if atom.isMainWindow()
|
||||
atom.unregisterHotWindow('composer')
|
||||
ComponentRegistry.unregister(ComposerView)
|
||||
ComponentRegistry.unregister(ComposeButton)
|
||||
ComponentRegistry.unregister(ComposerWithWindowProps)
|
||||
|
|
Loading…
Reference in a new issue