mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-01 13:14:16 +08:00
fix(sidebar): Display correct keyboard shortcuts in account switcher
- Fixes #1203
This commit is contained in:
parent
1afd380118
commit
2b6ed11828
1 changed files with 3 additions and 3 deletions
|
@ -44,7 +44,7 @@ class AccountSwitcher extends React.Component
|
||||||
_toggleDropdown: =>
|
_toggleDropdown: =>
|
||||||
@setState showing: !@state.showing
|
@setState showing: !@state.showing
|
||||||
|
|
||||||
_makeMenuItem: (item, idx = 0) =>
|
_makeMenuItem: (item, idx) =>
|
||||||
menuItem = {
|
menuItem = {
|
||||||
label: item.label,
|
label: item.label,
|
||||||
click: @_onSwitchAccount.bind(@, item)
|
click: @_onSwitchAccount.bind(@, item)
|
||||||
|
@ -64,11 +64,11 @@ class AccountSwitcher extends React.Component
|
||||||
if @props.accounts.length > 1
|
if @props.accounts.length > 1
|
||||||
unifiedItem = @_makeUnifiedItem()
|
unifiedItem = @_makeUnifiedItem()
|
||||||
template = [
|
template = [
|
||||||
@_makeMenuItem(unifiedItem)
|
@_makeMenuItem(unifiedItem, 1)
|
||||||
{type: 'separator'}
|
{type: 'separator'}
|
||||||
]
|
]
|
||||||
|
|
||||||
items.forEach (item, idx) => template.push(@_makeMenuItem(item, idx + 1))
|
items.forEach (item, idx) => template.push(@_makeMenuItem(item, idx + 2))
|
||||||
|
|
||||||
template = template.concat [
|
template = template.concat [
|
||||||
{type: 'separator'}
|
{type: 'separator'}
|
||||||
|
|
Loading…
Reference in a new issue