Browse Source

Moves declaration in

main
Ramin Tadayon 1 year ago
parent
commit
291a84884b
No known key found for this signature in database GPG Key ID: 79D60DDE3DFB95F5
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      src/commands/showView.ts

+ 3
- 2
src/commands/showView.ts View File

@ -33,7 +33,6 @@ export class ShowViewCommand extends Command {
async execute(context: CommandContext, ...args: any[]) { async execute(context: CommandContext, ...args: any[]) {
const command = context.command as Commands; const command = context.command as Commands;
let commandArgs = args;
switch (command) { switch (command) {
case Commands.ShowBranchesView: case Commands.ShowBranchesView:
return this.container.branchesView.show(); return this.container.branchesView.show();
@ -49,12 +48,14 @@ export class ShowViewCommand extends Command {
return this.container.homeView.show(); return this.container.homeView.show();
case Commands.ShowAccountView: case Commands.ShowAccountView:
return this.container.accountView.show(); return this.container.accountView.show();
case Commands.ShowGraphView:
case Commands.ShowGraphView: {
let commandArgs = args;
if (context.type === 'scm' && context.scm?.rootUri != null) { if (context.type === 'scm' && context.scm?.rootUri != null) {
const repo = this.container.git.getRepository(context.scm.rootUri); const repo = this.container.git.getRepository(context.scm.rootUri);
commandArgs = repo != null ? [repo, ...args] : args; commandArgs = repo != null ? [repo, ...args] : args;
} }
return this.container.graphView.show(undefined, ...commandArgs); return this.container.graphView.show(undefined, ...commandArgs);
}
case Commands.ShowLineHistoryView: case Commands.ShowLineHistoryView:
return this.container.lineHistoryView.show(); return this.container.lineHistoryView.show();
case Commands.ShowRemotesView: case Commands.ShowRemotesView:

Loading…
Cancel
Save