Mailspring/menus
Ben Gotow 214c8b2aaa feat(window-manager): Refactor window code, actually destroy main window when logging out
Summary:
Resolves T1200 and probably others.

This diff moves all the window management / hot loading into a new class called the WindowManager
and also changes the way the app transitions between onboarding and main window. When you log out,
the main window clears config and clearing the config causes the window manager to close the main
window and open the login window. When it detects a token again, it opens the main window.

This means you can't:
- Open the main window from the login window
- Open mailto: links and accidentally see the main window or a composer, since the draft store isn't
  running anywhere.
- Don't need to worry about properly resetting thigns when namespaces change, since the window
  is now actually re-created from scratch with the new auth token.

Be a little more defensive about namespace checks in draft-store

Move window code to window-manager

Rename AtomApplication to just `Application`

Specs fix

Test Plan: Run tests, would be good to have more for this.

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1200

Differential Revision: https://review.inboxapp.com/D1501
2015-05-14 14:54:29 -07:00
..
darwin.cson feat(window-manager): Refactor window code, actually destroy main window when logging out 2015-05-14 14:54:29 -07:00
linux.cson feat(window-manager): Refactor window code, actually destroy main window when logging out 2015-05-14 14:54:29 -07:00
win32.cson feat(window-manager): Refactor window code, actually destroy main window when logging out 2015-05-14 14:54:29 -07:00