diff --git a/src/flux/stores/account-store.coffee b/src/flux/stores/account-store.coffee index c5fe40da9..7cf16cea4 100644 --- a/src/flux/stores/account-store.coffee +++ b/src/flux/stores/account-store.coffee @@ -35,7 +35,7 @@ class AccountStore @_load() if newAccountIds.length > 0 Actions.selectAccount(newAccountIds[0]) - unless NylasEnv.isMainWindow() + if NylasEnv.isComposerWindow() NylasEnv.config.observe saveObjectsKey, => @_load() @_setupFastAccountCommands() diff --git a/src/nylas-env.coffee b/src/nylas-env.coffee index e1712ac27..1fa43861b 100644 --- a/src/nylas-env.coffee +++ b/src/nylas-env.coffee @@ -337,6 +337,9 @@ class NylasEnvConstructor extends Model isWorkWindow: -> @getWindowType() is 'work' + isComposerWindow: -> + @getWindowType() is 'composer' + getWindowType: -> @getLoadSettings().windowType