@@ -9,28 +9,34 @@ import { logError, LogPrefix } from './logger/logger'
9
9
autoUpdater . autoDownload = false
10
10
autoUpdater . autoInstallOnAppQuit = false
11
11
12
- autoUpdater . on ( 'update-available' , async ( ) => {
13
- const { response, checkboxChecked } = await dialog . showMessageBox ( {
12
+ async function showAutoupdateDialog ( ) {
13
+ const { response } = await dialog . showMessageBox ( {
14
14
title : t ( 'box.info.update.title' , 'Heroic Games Launcher' ) ,
15
15
message : t ( 'box.info.update.message' , 'There is a new Version available!' ) ,
16
16
detail : t (
17
17
'box.info.update.detail' ,
18
18
'Do you want to download the update in the background?'
19
19
) ,
20
- checkboxLabel : t ( 'box.info.update.changelog' , 'Open changelog' ) ,
21
- checkboxChecked : false ,
20
+
22
21
icon : nativeImage . createFromPath ( icon ) ,
23
- buttons : [ t ( 'box.no' ) , t ( 'box.yes' ) ]
22
+ buttons : [
23
+ t ( 'box.update' , 'Update' ) ,
24
+ t ( 'box.postpone' , 'Postpone' ) ,
25
+ t ( 'box.changelog' , 'Changelog' )
26
+ ]
24
27
} )
25
- if ( checkboxChecked ) {
28
+ if ( response === 0 ) {
29
+ autoUpdater . downloadUpdate ( )
30
+ }
31
+ if ( response === 2 ) {
26
32
shell . openExternal (
27
33
'https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/releases'
28
34
)
35
+ showAutoupdateDialog ( )
29
36
}
30
- if ( response === 1 ) {
31
- autoUpdater . downloadUpdate ( )
32
- }
33
- } )
37
+ }
38
+
39
+ autoUpdater . on ( 'update-available' , showAutoupdateDialog )
34
40
autoUpdater . on ( 'update-downloaded' , async ( ) => {
35
41
const { response } = await dialog . showMessageBox ( {
36
42
title : t ( 'box.info.update.title-finished' , 'Update Finished' ) ,
0 commit comments