@@ -17,22 +17,22 @@ class UpdateManager {
17
17
}
18
18
19
19
setEvents ( ) {
20
- autoUpdater . autoInstallOnAppQuit = ( this . darwin || this . linux ) ? true : false ;
20
+ autoUpdater . autoInstallOnAppQuit = this . darwin ;
21
21
autoUpdater . on ( 'update-available' , info => { this . sendStatusToWindow ( 'Update available' , 'available' , { ...info } ) ; } ) ;
22
22
autoUpdater . on ( 'update-not-available' , info => { this . sendStatusToWindow ( 'Update not available.' , 'not-available' , { ...info } ) ; } ) ;
23
23
autoUpdater . on ( 'error' , err => { this . sendStatusToWindow ( 'Error in auto-updater. ' + err , 'error' ) ; } ) ;
24
24
autoUpdater . on ( 'download-progress' , progressObj => { this . sendStatusToWindow ( 'Downloading update...' , 'progress' , { ...progressObj } ) ; } ) ;
25
25
autoUpdater . on ( 'update-downloaded' , ( { version } ) => {
26
26
this . sendStatusToWindow ( 'Update downloaded' , 'downloaded' , { version } ) ;
27
- const buttons = ( this . darwin || this . linux ) ? [ 'OK' ] : [ 'Restart' , 'Later' ] ;
27
+ const buttons = this . darwin ? [ 'OK' ] : [ 'Restart' , 'Later' ] ;
28
28
const dialogOpts = {
29
29
type : 'info' ,
30
30
buttons : buttons ,
31
31
title : 'Diff Checker Update' ,
32
32
message : 'A new version (' + version + ') has been downloaded.\nPlease restart the application to apply the updates.'
33
33
}
34
34
dialog . showMessageBox ( dialogOpts , response => {
35
- response === 0 && ! this . darwin && ! this . linux && autoUpdater . quitAndInstall ( ) ;
35
+ response === 0 && ! this . darwin && autoUpdater . quitAndInstall ( ) ;
36
36
} ) ;
37
37
} ) ;
38
38
}
0 commit comments