Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix panel not active message. #411

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 6 additions & 13 deletions src/extension/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ export function storeCollectionAsMemento(
]);
}

let petPlaygroundStatusBar: vscode.StatusBarItem;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unused as the spawnPetStatusBar is the one actually displayed

let spawnPetStatusBar: vscode.StatusBarItem;

interface IPetInfo {
Expand Down Expand Up @@ -309,14 +308,6 @@ export function activate(context: vscode.ExtensionContext) {
}),
);

// status bar item
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can remove this as associated with petPlaygroundStatusBar

petPlaygroundStatusBar = vscode.window.createStatusBarItem(
vscode.StatusBarAlignment.Right,
100,
);
petPlaygroundStatusBar.command = 'vscode-pets.start';
context.subscriptions.push(petPlaygroundStatusBar);

spawnPetStatusBar = vscode.window.createStatusBarItem(
vscode.StatusBarAlignment.Right,
100,
Expand Down Expand Up @@ -491,6 +482,12 @@ export function activate(context: vscode.ExtensionContext) {
context.subscriptions.push(
vscode.commands.registerCommand('vscode-pets.spawn-pet', async () => {
const panel = getPetPanel();
if (
getConfigurationPosition() === ExtPosition.explorer &&
webviewViewProvider
) {
vscode.commands.executeCommand('petsView.focus');
}
if (panel) {
const selectedPetType = await vscode.window.showQuickPick(
localize.stringListAsQuickPickItemList<PetType>(ALL_PETS),
Expand Down Expand Up @@ -643,10 +640,6 @@ function updateStatusBar(): void {
spawnPetStatusBar.show();
}

export function petPlaygroundDeactivate() {
petPlaygroundStatusBar.dispose();
}

export function spawnPetDeactivate() {
spawnPetStatusBar.dispose();
}
Expand Down