From e620b98d4cd1b4999c0bf4a2187eebc5bb3fbbd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Str=C3=B8msodd?= Date: Fri, 8 Jul 2016 20:14:42 +0200 Subject: [PATCH] Make display of onboarding page conditional. (#2485) When running against a custom Sync Engine, viewing the onboarding page on startup does not make much sense. This here adds code that checks for the `env` of the Nylas config and skips the onboarding if it is `local` or `custom`. --- src/browser/application.es6 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/browser/application.es6 b/src/browser/application.es6 index 01837015a..14bece6bc 100644 --- a/src/browser/application.es6 +++ b/src/browser/application.es6 @@ -193,8 +193,11 @@ export default class Application extends EventEmitter { const accounts = this.config.get('nylas.accounts'); const hasAccount = accounts && accounts.length > 0; const hasN1ID = this.config.get('nylas.identity.id'); + const env = this.config.get('env'); + const isLocalOrCustom = (env === 'local' || env === 'custom'); - if (hasAccount && hasN1ID) { + + if (isLocalOrCustom || (hasAccount && hasN1ID)) { this.windowManager.ensureWindow(WindowManager.MAIN_WINDOW); this.windowManager.ensureWindow(WindowManager.WORK_WINDOW); } else {