@@ -18,6 +18,7 @@ export class IDEUpdaterImpl implements IDEUpdater {
18
18
protected clients : Array < IDEUpdaterClient > = [ ] ;
19
19
20
20
init ( channel : UpdateChannel ) {
21
+ this . updater . autoDownload = false ;
21
22
this . updater . channel = channel ;
22
23
this . updater . setFeedURL ( {
23
24
provider : 'generic' ,
@@ -27,35 +28,33 @@ export class IDEUpdaterImpl implements IDEUpdater {
27
28
channel,
28
29
} ) ;
29
30
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
+ } ) ;
48
49
}
49
50
50
51
setClient ( client : IDEUpdaterClient | undefined ) : void {
51
52
if ( client ) this . clients . push ( client ) ;
52
53
}
53
54
54
55
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 ( ) ;
59
58
60
59
this . cancellationToken = cancellationToken ;
61
60
if ( this . updater . currentVersion . compare ( updateInfo . version ) === - 1 ) {
0 commit comments