This repository was archived by the owner on Jun 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -5,9 +5,11 @@ import { configStore } from '@app/stores/config';
55
66export type AppControlAction = 'devtools' | 'minimize' | 'maximize' | 'close' ;
77
8- const GeneralModule : ModuleFunction = ( { window } ) => {
8+ const GeneralModule : ModuleFunction = context => {
99 // 창 닫기, 최대화, 최소화 같은 컨트롤 기능
1010 ipcMain . on ( 'appControl' , async ( _ , action : AppControlAction ) => {
11+ const { window } = context ;
12+
1113 if ( ! window ) return ;
1214
1315 switch ( action ) {
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export type UpdateEvent =
1919 | 'download-progress'
2020 | 'update-downloaded' ;
2121
22- const UpdateModule : ModuleFunction = ( { window } ) => {
22+ const UpdateModule : ModuleFunction = context => {
2323 const handleUpdateEvent = ( event : UpdateEvent ) => {
2424 return ( data ?: any ) => {
2525 if ( event !== 'download-progress' ) {
@@ -30,8 +30,8 @@ const UpdateModule: ModuleFunction = ({ window }) => {
3030 } ) ;
3131 }
3232
33- if ( window ) {
34- window . webContents . send ( 'update' , event , data ) ;
33+ if ( context . window ) {
34+ context . window . webContents . send ( 'update' , event , data ) ;
3535 }
3636 } ;
3737 } ;
You can’t perform that action at this time.
0 commit comments