From 9392422760aed220c2eabc6935c05c991ca082dd Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Thu, 18 Feb 2016 16:09:30 -0800 Subject: [PATCH] fix(launchscreen): hack until renderer sync fixed upstream --- src/nylas-env.coffee | 35 +++++++++++++++++++++-------------- static/index.html | 7 ++++--- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/src/nylas-env.coffee b/src/nylas-env.coffee index 24fe9c872..5332416ed 100644 --- a/src/nylas-env.coffee +++ b/src/nylas-env.coffee @@ -665,23 +665,30 @@ class NylasEnvConstructor extends Model startRootWindow: -> {safeMode, windowType, initializeInBackground} = @getLoadSettings() - @displayWindow() unless initializeInBackground + # Temporary. It takes five paint cycles for all the CSS in index.html to + # be applied. Remove if https://github.com/atom/brightray/issues/196 fixed! + window.requestAnimationFrame => + window.requestAnimationFrame => + window.requestAnimationFrame => + window.requestAnimationFrame => + window.requestAnimationFrame => + @displayWindow() unless initializeInBackground - @registerCommands() - @loadConfig() - @keymaps.loadBundledKeymaps() - @themes.loadBaseStylesheets() - @packages.loadPackages(windowType) - @deserializePackageStates() - @deserializeSheetContainer() - @packages.activate() - @keymaps.loadUserKeymap() - @requireUserInitScript() unless safeMode - @menu.update() + @registerCommands() + @loadConfig() + @keymaps.loadBundledKeymaps() + @themes.loadBaseStylesheets() + @packages.loadPackages(windowType) + @deserializePackageStates() + @deserializeSheetContainer() + @packages.activate() + @keymaps.loadUserKeymap() + @requireUserInitScript() unless safeMode + @menu.update() - @showRootWindow() + @showRootWindow() - ipcRenderer.send('window-command', 'window:loaded') + ipcRenderer.send('window-command', 'window:loaded') showRootWindow: -> document.getElementById("application-loading-cover").remove() diff --git a/static/index.html b/static/index.html index c9152e586..8415700f6 100644 --- a/static/index.html +++ b/static/index.html @@ -5,9 +5,6 @@ - - - + + + +