mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-12-27 19:07:15 +08:00
fix(window): window launcher now assigns new window keys if none exist
Fixed issue where new windows wouldn't refresh themselves because the keys were stuck on the hot window
This commit is contained in:
parent
610aecb184
commit
3b365dd9b1
1 changed files with 3 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
import NylasWindow from './nylas-window'
|
||||
|
||||
const DEBUG_SHOW_HOT_WINDOW = false;
|
||||
let winNum = 0;
|
||||
|
||||
/**
|
||||
* It takes a full second or more to bootup a Nylas window. Most of this
|
||||
|
@ -61,6 +62,8 @@ export default class WindowLauncher {
|
|||
// Reset the loaded state and update the load settings.
|
||||
// This will fire `NylasEnv::populateHotWindow` and reload the
|
||||
// packages.
|
||||
win.windowKey = opts.windowKey || `${opts.windowType}-${winNum}`;
|
||||
winNum += 1;
|
||||
win.windowKey = opts.windowKey;
|
||||
win.windowType = opts.windowType;
|
||||
win.setLoadSettings(newLoadSettings);
|
||||
|
|
Loading…
Reference in a new issue