Skip to content

Commit 43ae67e

Browse files
committed
Keep dialog open after user clicks on install link
1 parent 757b4ff commit 43ae67e

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/vs/workbench/browser/window.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,7 @@ export class BrowserWindow extends Disposable {
203203

204204
invokeProtocolHandler();
205205

206-
// We cannot know whether the protocol handler succeeded.
207-
// Display guidance in case it did not, e.g. the app is not installed locally.
208-
if (matchesScheme(href, this.productService.urlProtocol)) {
206+
const showProtocolUrlOpenedDialog = async () => {
209207
const showResult = await this.dialogService.show(
210208
Severity.Info,
211209
localize('openExternalDialogTitle', "All done. You can close this tab now."),
@@ -223,12 +221,22 @@ export class BrowserWindow extends Disposable {
223221
if (showResult.choice === 0) {
224222
invokeProtocolHandler();
225223
} else if (showResult.choice === 1) {
224+
// Route the user to the appropriate install link
226225
await this.openerService.open(URI.parse(
227226
this.productService.quality === 'stable'
228227
? `http://aka.ms/vscode-install`
229228
: `http://aka.ms/vscode-install-insiders`
230229
));
230+
231+
// Re-show the dialog so that the user can come back after installing and try again
232+
showProtocolUrlOpenedDialog();
231233
}
234+
};
235+
236+
// We cannot know whether the protocol handler succeeded.
237+
// Display guidance in case it did not, e.g. the app is not installed locally.
238+
if (matchesScheme(href, this.productService.urlProtocol)) {
239+
await showProtocolUrlOpenedDialog();
232240
}
233241
}
234242

0 commit comments

Comments
 (0)