Skip to content

Commit

Permalink
fix: multiple instance open in profile switch #3
Browse files Browse the repository at this point in the history
  • Loading branch information
sefatanam committed Jul 30, 2024
1 parent 5ab6f5b commit f9217e6
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ vsc-extension-quickstart.md
**/*.map
**/*.ts
**/.vscode-test.*
**/screenshots/**
.github
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
9 changes: 8 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

})()
}

Expand Down

0 comments on commit f9217e6

Please sign in to comment.