Skip to content

Commit daa4a61

Browse files
author
Benjamin Pasero
authored
progress - turn window progress into silent notification progress (microsoft#93363)
1 parent cd182ca commit daa4a61

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/vs/workbench/services/progress/browser/progressService.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,14 @@ export class ProgressService extends Disposable implements IProgressService {
6868
case ProgressLocation.Notification:
6969
return this.withNotificationProgress({ ...options, location }, task, onDidCancel);
7070
case ProgressLocation.Window:
71-
return this.withWindowProgress({ ...options, location }, task);
71+
if ((options as IProgressWindowOptions).command) {
72+
// Window progress with command get's shown in the status bar
73+
return this.withWindowProgress({ ...options, location }, task);
74+
}
75+
// Window progress without command can be shown as silent notification
76+
// which will first appear in the status bar and can then be brought to
77+
// the front when clicking.
78+
return this.withNotificationProgress({ ...options, silent: true, location: ProgressLocation.Notification }, task, onDidCancel);
7279
case ProgressLocation.Explorer:
7380
return this.withViewletProgress('workbench.view.explorer', task, { ...options, location });
7481
case ProgressLocation.Scm:

0 commit comments

Comments
 (0)