mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-22 23:23:54 +08:00
fix(win): When windows are removed, keep ivars in sync
This commit is contained in:
parent
e0ddfb736d
commit
a3dbab332e
1 changed files with 4 additions and 0 deletions
|
@ -422,6 +422,10 @@ class WindowManager
|
||||||
# Public: Removes the {AtomWindow} from the global window list.
|
# Public: Removes the {AtomWindow} from the global window list.
|
||||||
removeWindow: (window) ->
|
removeWindow: (window) ->
|
||||||
@_windows.splice @_windows.indexOf(window), 1
|
@_windows.splice @_windows.indexOf(window), 1
|
||||||
|
if window is @_mainWindow
|
||||||
|
@_mainWindow = null
|
||||||
|
if window is @_workWindow
|
||||||
|
@_workWindow = null
|
||||||
@applicationMenu?.enableWindowSpecificItems(false) if @_windows.length == 0
|
@applicationMenu?.enableWindowSpecificItems(false) if @_windows.length == 0
|
||||||
@windowClosedOrHidden()
|
@windowClosedOrHidden()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue