Skip to content

Commit

Permalink
Prompt do not show again on updates
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnnyMorganz committed Dec 30, 2023
1 parent 7b5cf90 commit f15476e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions stylua-vscode/src/download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ export class StyluaDownloader implements vscode.Disposable {
}
}
}
} else {
this.statusBarUpdateItem.hide();
}
} else if (stylua.resolveMode === ResolveMode.configuration) {
if (!(await util.fileExists(stylua.path))) {
Expand Down
8 changes: 7 additions & 1 deletion stylua-vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ export async function activate(context: vscode.ExtensionContext) {
`Are you sure you want to update StyLua to ${release.tagName}?`,
{ modal: true },
"Update",
"Release Notes"
"Release Notes",
"Do not show again"
);

switch (result) {
Expand All @@ -187,6 +188,11 @@ export async function activate(context: vscode.ExtensionContext) {
case "Release Notes":
vscode.env.openExternal(vscode.Uri.parse(release.htmlUrl));
break;
case "Do not show again":
vscode.workspace
.getConfiguration("stylua")
.update("disableVersionCheck", true);
break;
}
}
)
Expand Down

0 comments on commit f15476e

Please sign in to comment.