mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-08 21:55:54 +08:00
fix(sidebar): Update sidebar correctly when an account added or removed
This commit is contained in:
parent
87a1fc6d29
commit
223f7fdde4
1 changed files with 5 additions and 1 deletions
|
@ -39,8 +39,8 @@ class SidebarStore extends NylasStore
|
|||
|
||||
_registerListeners: ->
|
||||
@listenTo SidebarActions.focusAccounts, @_onAccountsFocused
|
||||
@listenTo AccountStore, @_onAccountsChanged
|
||||
@listenTo FocusedPerspectiveStore, @_updateSections
|
||||
@listenTo AccountStore, @_updateSections
|
||||
@listenTo WorkspaceStore, @_updateSections
|
||||
@listenTo ThreadCountsStore, @_updateSections
|
||||
@listenTo CategoryStore, @_updateSections
|
||||
|
@ -60,6 +60,10 @@ class SidebarStore extends NylasStore
|
|||
@_focusedAccounts = accounts
|
||||
@_updateSections()
|
||||
|
||||
_onAccountsChanged: =>
|
||||
@_focusedAccounts = AccountStore.accounts()
|
||||
@_updateSections()
|
||||
|
||||
_updateSections: =>
|
||||
accounts = @_focusedAccounts
|
||||
multiAccount = accounts.length > 1
|
||||
|
|
Loading…
Add table
Reference in a new issue