Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
zadam committed Sep 13, 2023
1 parent d46801f commit 925bba1
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions src/public/app/components/root_command_executor.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,23 +155,25 @@ export default class RootCommandExecutor extends Component {
}
}

firstTabCommand() {this.#goToTab(1);}
secondTabCommand() {this.#goToTab(2);}
thirdTabCommand() {this.#goToTab(3);}
fourthTabCommand() {this.#goToTab(4);}
fifthTabCommand() {this.#goToTab(5);}
sixthTabCommand() {this.#goToTab(6);}
seventhTabCommand() {this.#goToTab(7);}
eigthTabCommand() {this.#goToTab(8);}
ninthTabCommand() {this.#goToTab(9);}
lastTabCommand() {this.#goToTab(Number.POSITIVE_INFINITY);}
firstTabCommand() { this.#goToTab(1); }
secondTabCommand() { this.#goToTab(2); }
thirdTabCommand() { this.#goToTab(3); }
fourthTabCommand() { this.#goToTab(4); }
fifthTabCommand() { this.#goToTab(5); }
sixthTabCommand() { this.#goToTab(6); }
seventhTabCommand() { this.#goToTab(7); }
eigthTabCommand() { this.#goToTab(8); }
ninthTabCommand() { this.#goToTab(9); }
lastTabCommand() { this.#goToTab(Number.POSITIVE_INFINITY); }

#goToTab(tabNumber) {
const mainNoteContexts = appContext.tabManager.getMainNoteContexts();

const index = tabNumber === Number.POSITIVE_INFINITY ? mainNoteContexts.length - 1 : tabNumber - 1;
const tab = mainNoteContexts[index];

appContext.tabManager.activateNoteContext(tab.ntxId);
if (tab) {
appContext.tabManager.activateNoteContext(tab.ntxId);
}
}
}

0 comments on commit 925bba1

Please sign in to comment.