mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-12-11 15:06:15 +08:00
fix(linux): Window manager throwing exception when all closed
This commit is contained in:
parent
f7b4bb4f12
commit
b12e5c512f
3 changed files with 3 additions and 3 deletions
|
|
@ -2,6 +2,7 @@ _ = require 'underscore-plus'
|
||||||
fs = require 'fs-plus'
|
fs = require 'fs-plus'
|
||||||
AtomWindow = require './atom-window'
|
AtomWindow = require './atom-window'
|
||||||
BrowserWindow = require 'browser-window'
|
BrowserWindow = require 'browser-window'
|
||||||
|
app = require 'app'
|
||||||
|
|
||||||
class WindowManager
|
class WindowManager
|
||||||
|
|
||||||
|
|
@ -312,10 +313,9 @@ class WindowManager
|
||||||
visible = false
|
visible = false
|
||||||
visible ||= window.isVisible() for window in @_windows
|
visible ||= window.isVisible() for window in @_windows
|
||||||
if visible is false
|
if visible is false
|
||||||
@quitting = true
|
global.application.quitting = true
|
||||||
# Quitting the app from within a window event handler causes
|
# Quitting the app from within a window event handler causes
|
||||||
# an assertion error. Wait a moment.
|
# an assertion error. Wait a moment.
|
||||||
_.defer -> app.quit()
|
_.defer -> app.quit()
|
||||||
|
|
||||||
|
|
||||||
module.exports = WindowManager
|
module.exports = WindowManager
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ class EdgehillAPI
|
||||||
|
|
||||||
# todo: remove once the edgehill-server inbox service is called `nylas`
|
# todo: remove once the edgehill-server inbox service is called `nylas`
|
||||||
if token.provider is 'inbox'
|
if token.provider is 'inbox'
|
||||||
atom.config.set("nylas.token", token.access_token)
|
atom.config.set("nylas.token", token.access_token)
|
||||||
|
|
||||||
if token.user_identifier?
|
if token.user_identifier?
|
||||||
@_setCredentials({username: token.user_identifier, password: ''})
|
@_setCredentials({username: token.user_identifier, password: ''})
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue