From f9217e69075e43c7b10b0233f3e600dee4a0a8c0 Mon Sep 17 00:00:00 2001 From: sefatanam Date: Tue, 30 Jul 2024 14:28:10 +0600 Subject: [PATCH] fix: multiple instance open in profile switch #3 --- .vscodeignore | 2 ++ CHANGELOG.md | 10 ++++++++++ README.md | 1 + package.json | 2 +- src/extension.ts | 9 ++++++++- 5 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.vscodeignore b/.vscodeignore index a4b3966..639b540 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -12,3 +12,5 @@ vsc-extension-quickstart.md **/*.map **/*.ts **/.vscode-test.* +**/screenshots/** +.github \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 096e7e6..0b1d239 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,3 +48,13 @@ Pretty Home is a VS Code extension designed to enhance the appearance of your re - Remove redundant `Pretty Home Initialized ✨` notification + +#### Known Issue +- [Pretty home instance open multiple instances on profile switch](https://github.com/sefatanam/vscode-pretty-home/issues/3) + + +### Version 1.1.3 (2024-07-30) + +#### Fix + +- [Pretty home instance open multiple instances on profile switch](https://github.com/sefatanam/vscode-pretty-home/issues/3) \ No newline at end of file diff --git a/README.md b/README.md index 630bfe3..389dff1 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ After installing the extension, navigate to the command palette in VS Code and s - **1.1.0**: Configurable to show default in homepage accessible from command pallete. - **1.1.1**: Improve user experince, bug fixes and code refactored. - **1.1.2**: Fix Load on startup by default. +- **1.1.3**: Pretty home instance open multiple instances on profile switch. **Contributing:** Contributions are welcome. Feel free to submit issues or pull requests on [GitHub](https://github.com/sefatanam/vscode-pretty-home). diff --git a/package.json b/package.json index cdc8d13..61579a0 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "pretty-home", "displayName": "Pretty Home", "description": "Pretty Home is a VS Code extension designed to enhance the appearance of your recent projects view, making it more organized and visually appealing", - "version": "1.1.2", + "version": "1.1.3", "license": "MIT", "icon": "icon.png", "publisher": "sefatanam", diff --git a/src/extension.ts b/src/extension.ts index 44a1fd3..71a905a 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -27,7 +27,14 @@ export async function activate(context: vscode.ExtensionContext) { }); (function init() { - vscode.commands.executeCommand('extension.prettyHome'); + const isInstanceOpen = vscode.window.tabGroups.all + .flatMap(group => group.tabs) + .find(tab => tab.label.trim().includes('Pretty-Home')) + + if (!isInstanceOpen) { + vscode.commands.executeCommand('extension.prettyHome'); + } + })() }