Skip to content

Instantly share code, notes, and snippets.

@dece
Created June 6, 2019 15:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dece/08e4efd81479a0b46805eb5370877de1 to your computer and use it in GitHub Desktop.
Save dece/08e4efd81479a0b46805eb5370877de1 to your computer and use it in GitHub Desktop.
Patch to remove Mailspring ID registration wall at start-up (from 06d2e4546, master 2019-06-06).
From 5de9b0584edbb214a062386526ff464e4f011cad Mon Sep 17 00:00:00 2001
From: Dece <shgck@pistache.land>
Date: Thu, 6 Jun 2019 16:58:50 +0200
Subject: [PATCH] Remove onboarding Webview from firing at startup
By removing the onboarding view it prevents the application from forcing
you to register a Mailspring ID. A side effect is it removes the whole
welcoming process and initial setup of accounts, but nothing that can't
be set afterwards.
The rest of the app can be used without issues, you just won't have any
access to Mailspring ID related features.
---
app/src/browser/application.ts | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/app/src/browser/application.ts b/app/src/browser/application.ts
index d478098f8..977683f4e 100644
--- a/app/src/browser/application.ts
+++ b/app/src/browser/application.ts
@@ -267,17 +267,8 @@ export default class Application extends EventEmitter {
// before migration has completed and the config has been loaded.
if (!this.config) return;
- const accounts = this.config.get('accounts');
- const hasAccount = accounts && accounts.length > 0;
- const hasIdentity = this.config.get('identity.id');
-
- if (hasAccount && hasIdentity) {
- this.windowManager.ensureWindow(WindowManager.MAIN_WINDOW);
- } else {
- this.windowManager.ensureWindow(WindowManager.ONBOARDING_WINDOW, {
- title: localized('Welcome to Mailspring'),
- });
- }
+ // Onboarding Webview is removed here to bypass Mailspring ID registration.
+ this.windowManager.ensureWindow(WindowManager.MAIN_WINDOW);
}
_resetDatabaseAndRelaunch = ({ errorMessage }: { errorMessage?: string } = {}) => {
--
2.11.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment