From 009098a6a4bcda05a61711fdb9b32ea3a8ed4733 Mon Sep 17 00:00:00 2001 From: Evan Morikawa Date: Mon, 15 Aug 2016 14:16:54 -0700 Subject: [PATCH] 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 --- src/browser/window-launcher.es6 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/browser/window-launcher.es6 b/src/browser/window-launcher.es6 index f787c4392..ca3bcf441 100644 --- a/src/browser/window-launcher.es6 +++ b/src/browser/window-launcher.es6 @@ -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);