mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-28 15:35:37 +08:00
fix(onboarding): AccountStore only listens to changes to account obj when window
type is composer - AccountStore was listening to changes to account object (config file) when it was a window different from the main window in order to update the alias list on composer windows. - This caused the onboarding window to also listen for changes and caused it to incorrectly add an account twice
This commit is contained in:
parent
1a3c6eef68
commit
58cc141cdf
2 changed files with 4 additions and 1 deletions
|
@ -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()
|
||||
|
|
|
@ -337,6 +337,9 @@ class NylasEnvConstructor extends Model
|
|||
isWorkWindow: ->
|
||||
@getWindowType() is 'work'
|
||||
|
||||
isComposerWindow: ->
|
||||
@getWindowType() is 'composer'
|
||||
|
||||
getWindowType: ->
|
||||
@getLoadSettings().windowType
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue