@@ -18,6 +18,7 @@ export class IDEUpdaterImpl implements IDEUpdater {
1818 protected clients : Array < IDEUpdaterClient > = [ ] ;
1919
2020 init ( channel : UpdateChannel ) {
21+ this . updater . autoDownload = false ;
2122 this . updater . channel = channel ;
2223 this . updater . setFeedURL ( {
2324 provider : 'generic' ,
@@ -27,35 +28,33 @@ export class IDEUpdaterImpl implements IDEUpdater {
2728 channel,
2829 } ) ;
2930
30- this . updater . on ( 'checking-for-update' , ( e ) =>
31- this . clients . forEach ( ( c ) => c . notifyCheckingForUpdate ( e ) )
32- ) ;
33- this . updater . on ( 'update-available' , ( e ) =>
34- this . clients . forEach ( ( c ) => c . notifyUpdateAvailable ( e ) )
35- ) ;
36- this . updater . on ( 'update-not-available' , ( e ) =>
37- this . clients . forEach ( ( c ) => c . notifyUpdateNotAvailable ( e ) )
38- ) ;
39- this . updater . on ( 'download-progress' , ( e ) =>
40- this . clients . forEach ( ( c ) => c . notifyDownloadProgressChanged ( e ) )
41- ) ;
42- this . updater . on ( 'update-downloaded' , ( e ) =>
43- this . clients . forEach ( ( c ) => c . notifyDownloadFinished ( e ) )
44- ) ;
45- this . updater . on ( 'error' , ( e ) =>
46- this . clients . forEach ( ( c ) => c . notifyError ( e ) )
47- ) ;
31+ this . updater . on ( 'checking-for-update' , ( e ) => {
32+ this . clients . forEach ( ( c ) => c . notifyCheckingForUpdate ( e ) ) ;
33+ } ) ;
34+ this . updater . on ( 'update-available' , ( e ) => {
35+ this . clients . forEach ( ( c ) => c . notifyUpdateAvailable ( e ) ) ;
36+ } ) ;
37+ this . updater . on ( 'update-not-available' , ( e ) => {
38+ this . clients . forEach ( ( c ) => c . notifyUpdateNotAvailable ( e ) ) ;
39+ } ) ;
40+ this . updater . on ( 'download-progress' , ( e ) => {
41+ this . clients . forEach ( ( c ) => c . notifyDownloadProgressChanged ( e ) ) ;
42+ } ) ;
43+ this . updater . on ( 'update-downloaded' , ( e ) => {
44+ this . clients . forEach ( ( c ) => c . notifyDownloadFinished ( e ) ) ;
45+ } ) ;
46+ this . updater . on ( 'error' , ( e ) => {
47+ this . clients . forEach ( ( c ) => c . notifyError ( e ) ) ;
48+ } ) ;
4849 }
4950
5051 setClient ( client : IDEUpdaterClient | undefined ) : void {
5152 if ( client ) this . clients . push ( client ) ;
5253 }
5354
5455 async checkForUpdates ( ) : Promise < UpdateInfo | void > {
55- const {
56- updateInfo,
57- cancellationToken,
58- } = await this . updater . checkForUpdates ( ) ;
56+ const { updateInfo, cancellationToken } =
57+ await this . updater . checkForUpdates ( ) ;
5958
6059 this . cancellationToken = cancellationToken ;
6160 if ( this . updater . currentVersion . compare ( updateInfo . version ) === - 1 ) {
0 commit comments