mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-19 22:50:13 +08:00
fix(win-launching): Only create hot window when one is used
This commit is contained in:
parent
ceb4993c62
commit
52f3607606
1 changed files with 2 additions and 5 deletions
|
@ -50,7 +50,8 @@ export default class WindowLauncher {
|
||||||
if (!this.hotWindow) {
|
if (!this.hotWindow) {
|
||||||
this.createHotWindow()
|
this.createHotWindow()
|
||||||
}
|
}
|
||||||
win = this.hotWindow
|
win = this.hotWindow;
|
||||||
|
this.createHotWindow();
|
||||||
|
|
||||||
const newLoadSettings = Object.assign({}, win.loadSettings(), opts)
|
const newLoadSettings = Object.assign({}, win.loadSettings(), opts)
|
||||||
if (newLoadSettings.windowType === WindowLauncher.EMPTY_WINDOW) {
|
if (newLoadSettings.windowType === WindowLauncher.EMPTY_WINDOW) {
|
||||||
|
@ -73,10 +74,6 @@ export default class WindowLauncher {
|
||||||
// hide based on the windowOpts
|
// hide based on the windowOpts
|
||||||
win.showWhenLoaded()
|
win.showWhenLoaded()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a new hot window to keep in store for the next time we call
|
|
||||||
// newWindow()
|
|
||||||
this.createHotWindow();
|
|
||||||
return win
|
return win
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue