fix(add-account): Don't check for tokens from secondary windows

This commit is contained in:
Ben Gotow 2015-08-21 18:23:24 -07:00
parent 4faf2b1de2
commit 0af18c9f2e
2 changed files with 6 additions and 4 deletions

View file

@ -112,7 +112,8 @@ class AtomWindow
setLoadSettings: (loadSettings) ->
@browserWindow.loadSettings = loadSettings
@browserWindow.loadSettingsChangedSinceGetURL = true
@browserWindow.webContents.send('load-settings-changed', loadSettings) if @loaded
if @loaded
@browserWindow.webContents.send('load-settings-changed', loadSettings)
getUrl: (loadSettingsObj) ->
# Ignore the windowState when passing loadSettings via URL, since it could

View file

@ -14,9 +14,10 @@ class EdgehillAPI
# Always ask Edgehill Server for our tokens at launch. This way accounts
# added elsewhere will appear, and we'll also handle the 0.2.5=>0.3.0 upgrade.
existing = @_getCredentials()
if existing and existing.username
@setUserIdentifierAndRetrieveTokens(existing.username)
if atom.isMainWindow()
existing = @_getCredentials()
if existing and existing.username
@setUserIdentifierAndRetrieveTokens(existing.username)
@