mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-11 18:32:20 +08:00
PreferencesStore pull current account from FocusedPerspective
This commit is contained in:
parent
80658e7cf2
commit
2beeccdecd
1 changed files with 4 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
_ = require 'underscore'
|
_ = require 'underscore'
|
||||||
NylasStore = require 'nylas-store'
|
NylasStore = require 'nylas-store'
|
||||||
AccountStore = require './account-store'
|
FocusedPerspectiveStore = require './focused-perspective-store'
|
||||||
Actions = require '../actions'
|
Actions = require '../actions'
|
||||||
Immutable = require 'immutable'
|
Immutable = require 'immutable'
|
||||||
|
|
||||||
|
@ -13,10 +13,12 @@ class TabItem
|
||||||
|
|
||||||
class PreferencesUIStore extends NylasStore
|
class PreferencesUIStore extends NylasStore
|
||||||
constructor: ->
|
constructor: ->
|
||||||
|
perspective = FocusedPerspectiveStore.current()
|
||||||
|
|
||||||
@_tabs = Immutable.List()
|
@_tabs = Immutable.List()
|
||||||
@_selection = Immutable.Map({
|
@_selection = Immutable.Map({
|
||||||
tabId: null
|
tabId: null
|
||||||
accountId: AccountStore.accounts()[0].accountId
|
accountId: perspective?.account?.id
|
||||||
})
|
})
|
||||||
|
|
||||||
@_triggerDebounced ?= _.debounce(( => @trigger()), 20)
|
@_triggerDebounced ?= _.debounce(( => @trigger()), 20)
|
||||||
|
|
Loading…
Reference in a new issue