[MM-22618] Reorder tab menu items to match tab order (#1198)

* reorder tab menu items to match tab order

* now reorder menu items on tray icon
This commit is contained in:
Dean Whillier 2020-02-18 09:49:21 -05:00 committed by GitHub
parent 59bc03d6ab
commit e00f803fd3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -241,7 +241,7 @@ function createTemplate(mainWindow, config, isDev) {
}, {
role: 'close',
accelerator: 'CmdOrCtrl+W',
}, separatorItem, ...teams.slice(0, 9).map((team, i) => {
}, separatorItem, ...teams.slice(0, 9).sort((teamA, teamB) => teamA.order - teamB.order).map((team, i) => {
return {
label: team.name,
accelerator: `CmdOrCtrl+${i + 1}`,

View file

@ -9,7 +9,7 @@ function createTemplate(mainWindow, config, isDev) {
const settingsURL = isDev ? 'http://localhost:8080/browser/settings.html' : `file://${app.getAppPath()}/browser/settings.html`;
const teams = config.teams;
const template = [
...teams.slice(0, 9).map((team, i) => {
...teams.slice(0, 9).sort((teamA, teamB) => teamA.order - teamB.order).map((team, i) => {
return {
label: team.name,
click: () => {