File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,6 +22,17 @@ const createWindow = () => {
2222 } ,
2323 } ) ;
2424
25+ mainWindow . once ( 'ready-to-show' , ( ) => {
26+ if ( app . isPackaged ) {
27+ autoUpdater . setFeedURL ( {
28+ provider : 'github' ,
29+ owner : 'programmingKyle' ,
30+ repo : 'clocker' ,
31+ } ) ;
32+ autoUpdater . checkForUpdatesAndNotify ( ) ;
33+ }
34+ } ) ;
35+
2536 // and load the index.html of the app.
2637 mainWindow . loadFile ( path . join ( __dirname , 'index.html' ) ) ;
2738
@@ -51,17 +62,6 @@ app.on('activate', () => {
5162 }
5263} ) ;
5364
54- mainWindow . once ( 'ready-to-show' , ( ) => {
55- if ( app . isPackaged ) {
56- autoUpdater . setFeedURL ( {
57- provider : 'github' ,
58- owner : 'programmingKyle' ,
59- repo : 'clocker' ,
60- } ) ;
61- autoUpdater . checkForUpdatesAndNotify ( ) ;
62- }
63- } ) ;
64-
6565autoUpdater . on ( 'checking-for-update' , ( ) => {
6666 mainWindow . webContents . send ( 'auto-updater-callback' , 'Checking for Update' ) ;
6767} ) ;
You can’t perform that action at this time.
0 commit comments