File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import { debounce } from 'lodash'
88import { subscribeToChannels } from './services/ipc'
99import { mainMenu } from './menu/main'
1010import { subscribeToDialog } from './services/ipc/dialog'
11- import { checkForUpdate } from './services/update-check'
11+ import { checkForUpdateWithInterval } from './services/update-check'
1212
1313const isDev = process . env . NODE_ENV === 'development'
1414const isMac = process . platform === 'darwin'
@@ -46,7 +46,7 @@ function createWindow () {
4646 mainWindow . on ( 'resize' , ( ) => storeBounds ( mainWindow ) )
4747 mainWindow . on ( 'move' , ( ) => storeBounds ( mainWindow ) )
4848
49- checkForUpdate ( )
49+ checkForUpdateWithInterval ( )
5050}
5151
5252const storeBounds = debounce ( ( mainWindow : BrowserWindow ) => {
Original file line number Diff line number Diff line change @@ -26,3 +26,11 @@ export const checkForUpdate = async () => {
2626 console . error ( err )
2727 }
2828}
29+
30+ export const checkForUpdateWithInterval = ( ) => {
31+ checkForUpdate ( )
32+
33+ setInterval ( ( ) => {
34+ checkForUpdate ( )
35+ } , 1000 * 60 * 360 ) // 6 часов
36+ }
You can’t perform that action at this time.
0 commit comments