@@ -15,9 +15,9 @@ export class TaskExtension {
1515 this . setTreeNesting ( settings . treeNesting ) ;
1616 }
1717
18- public async update ( ) : Promise < void > {
18+ public async update ( checkForUpdates ?: boolean ) : Promise < void > {
1919 // Do version checks
20- await services . taskfile . checkInstallation ( ) . then ( ( status ) : Promise < PromiseSettledResult < models . Taskfile > [ ] > => {
20+ await services . taskfile . checkInstallation ( checkForUpdates ) . then ( ( status ) : Promise < PromiseSettledResult < models . Taskfile > [ ] > => {
2121
2222 // Set the status
2323 vscode . commands . executeCommand ( 'setContext' , 'vscode-task:status' , status ) ;
@@ -43,13 +43,9 @@ export class TaskExtension {
4343 } ) ;
4444 }
4545
46- public refresh ( ) : void {
47- this . _activityBar . refresh ( this . _taskfiles ) ;
48- }
49-
50- public async updateAndRefresh ( ) : Promise < void > {
51- await this . update ( ) . then ( ( ) => {
52- this . refresh ( ) ;
46+ public async refresh ( checkForUpdates ?: boolean ) : Promise < void > {
47+ await this . update ( checkForUpdates ) . then ( ( ) => {
48+ this . _activityBar . refresh ( this . _taskfiles ) ;
5349 } ) . catch ( ( err : string ) => {
5450 log . error ( err ) ;
5551 } ) ;
@@ -86,7 +82,7 @@ export class TaskExtension {
8682 // Refresh tasks
8783 context . subscriptions . push ( vscode . commands . registerCommand ( 'vscode-task.refresh' , ( ) => {
8884 log . info ( "Command: vscode-task.refresh" ) ;
89- this . updateAndRefresh ( ) ;
85+ this . refresh ( false ) ;
9086 } ) ) ;
9187
9288 // View tasks as list
@@ -200,7 +196,7 @@ export class TaskExtension {
200196 log . info ( "Detected changes to taskfile" ) ;
201197 // If manual updating is turned off (update on save)
202198 if ( settings . updateOn !== "manual" ) {
203- await this . updateAndRefresh ( ) ;
199+ await this . refresh ( false ) ;
204200 }
205201 }
206202
0 commit comments