[MM-38570] Fixed the keyboard shortcuts for switching tabs when some tabs are closed (#1739)
This commit is contained in:
parent
c12c9fb2e4
commit
fc9bf1e4a3
|
@ -220,7 +220,7 @@ function createTemplate(config: Config) {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
if (WindowManager.getCurrentTeamName() === team.name) {
|
if (WindowManager.getCurrentTeamName() === team.name) {
|
||||||
team.tabs.slice(0, 9).sort((teamA, teamB) => teamA.order - teamB.order).forEach((tab, i) => {
|
team.tabs.filter((tab) => tab.isOpen).slice(0, 9).sort((teamA, teamB) => teamA.order - teamB.order).forEach((tab, i) => {
|
||||||
items.push({
|
items.push({
|
||||||
label: ` ${getTabDisplayName(tab.name as TabType)}`,
|
label: ` ${getTabDisplayName(tab.name as TabType)}`,
|
||||||
accelerator: `CmdOrCtrl+${i + 1}`,
|
accelerator: `CmdOrCtrl+${i + 1}`,
|
||||||
|
|
|
@ -353,7 +353,7 @@ function initializeViewManager() {
|
||||||
status.viewManager = new ViewManager(status.config, status.mainWindow);
|
status.viewManager = new ViewManager(status.config, status.mainWindow);
|
||||||
status.viewManager.load();
|
status.viewManager.load();
|
||||||
status.viewManager.showInitial();
|
status.viewManager.showInitial();
|
||||||
status.currentServerName = status.config.teams.find((team) => team.order === 0)?.name;
|
status.currentServerName = (status.config.teams.find((team) => team.order === status.config?.lastActiveTeam) || status.config.teams.find((team) => team.order === 0))?.name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue