mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-11 18:32:20 +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
46b18edc3d
commit
009098a6a4
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