File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1283,8 +1283,20 @@ app.whenReady().then(() =>
12831283 owner : 'jgraph'
12841284 } )
12851285
1286- if ( store == null || ( ! disableUpdate && ! store . get ( 'dontCheckUpdates' ) ) )
1286+ // Cache update check - configurable interval (default: 24 hours)
1287+ const DEFAULT_UPDATE_CHECK_HOURS = 24 ;
1288+ const updateCheckHours = store ?. get ( 'updateCheckIntervalHours' ) ?? DEFAULT_UPDATE_CHECK_HOURS ;
1289+ const UPDATE_CHECK_INTERVAL = updateCheckHours * 60 * 60 * 1000 ;
1290+ const lastUpdateCheck = store ?. get ( 'lastUpdateCheck' ) || 0 ;
1291+ const shouldCheckUpdates = Date . now ( ) - lastUpdateCheck > UPDATE_CHECK_INTERVAL ;
1292+
1293+ if ( store == null || ( ! disableUpdate && ! store . get ( 'dontCheckUpdates' ) && shouldCheckUpdates ) )
12871294 {
1295+ if ( store != null )
1296+ {
1297+ store . set ( 'lastUpdateCheck' , Date . now ( ) ) ;
1298+ }
1299+
12881300 autoUpdater . checkForUpdates ( )
12891301 }
12901302} )
You can’t perform that action at this time.
0 commit comments