File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed
Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " electron-gp" ,
33 "private" : true ,
4- "version" : " 0.2.11 " ,
4+ "version" : " 0.2.12 " ,
55 "type" : " module" ,
66 "main" : " dist-main/app.js" ,
77 "author" : " traeop" ,
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ import type {
88} from "../@core/types/ipc-handler.js" ;
99import { ipcMainOn } from "../$shared/utils.js" ;
1010import { TrayService } from "../tray/service.js" ;
11- import { CheckForUpdatesService } from "./services/check-for-updates.js" ;
1211import { OpenLatestVersionService } from "./services/mac-os/open-latest-version.js" ;
1312
1413const { autoUpdater } = pkg ;
@@ -19,7 +18,6 @@ export class UpdaterIpc implements TIpcHandlerInterface {
1918
2019 constructor (
2120 private trayService : TrayService ,
22- private checkForUpdatesService : CheckForUpdatesService ,
2321 private openLatestVersionService : OpenLatestVersionService
2422 ) { }
2523
@@ -35,8 +33,6 @@ export class UpdaterIpc implements TIpcHandlerInterface {
3533 } else {
3634 this . updateAppWindow = await updateAppWindow . create ( ) ;
3735 }
38-
39- this . checkForUpdatesService . checkForUpdates ( ) ;
4036 } ;
4137 }
4238
Original file line number Diff line number Diff line change @@ -16,9 +16,19 @@ import { CheckForUpdatesService } from "./services/check-for-updates.js";
1616 } ,
1717} )
1818export class UpdaterWindow implements TWindowManager {
19+ private isCheckFirst = true ;
1920 constructor ( private checkForUpdatesService : CheckForUpdatesService ) { }
2021
2122 onDidFinishLoad ( ) : void {
22- this . checkForUpdatesService . checkForUpdates ( ) ;
23+ if ( this . isCheckFirst ) {
24+ this . checkForUpdatesService . checkForUpdates ( ) ;
25+ this . isCheckFirst = false ;
26+ }
27+ }
28+
29+ onShow ( ) {
30+ if ( ! this . isCheckFirst ) {
31+ this . checkForUpdatesService . checkForUpdates ( ) ;
32+ }
2333 }
2434}
You can’t perform that action at this time.
0 commit comments