mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-01 13:14:16 +08:00
fix(account-switcher): Don't display "All Accounts" when only 1 account
This commit is contained in:
parent
4b68f47040
commit
be73b8bea8
1 changed files with 4 additions and 1 deletions
|
@ -139,7 +139,10 @@ class AccountSwitcher extends React.Component
|
||||||
classnames = ""
|
classnames = ""
|
||||||
classnames += "open" if @state.showing
|
classnames += "open" if @state.showing
|
||||||
selected = @_selectedItem()
|
selected = @_selectedItem()
|
||||||
items = [@_makeItem()].concat @props.accounts.map(@_makeItem)
|
if @props.accounts.length is 1
|
||||||
|
items = @props.accounts.map(@_makeItem)
|
||||||
|
else
|
||||||
|
items = [@_makeItem()].concat @props.accounts.map(@_makeItem)
|
||||||
|
|
||||||
<div id="account-switcher"
|
<div id="account-switcher"
|
||||||
tabIndex={-1}
|
tabIndex={-1}
|
||||||
|
|
Loading…
Reference in a new issue