@@ -37,6 +37,7 @@ const {
37
37
SET_LANGUAGE_CHANNEL ,
38
38
GET_APP_INSTANCE_RESOURCES_CHANNEL ,
39
39
POST_APP_INSTANCE_RESOURCE_CHANNEL ,
40
+ DELETE_APP_INSTANCE_RESOURCE_CHANNEL ,
40
41
PATCH_APP_INSTANCE_RESOURCE_CHANNEL ,
41
42
GET_APP_INSTANCE_CHANNEL ,
42
43
GET_DEVELOPER_MODE_CHANNEL ,
@@ -75,6 +76,7 @@ const {
75
76
SET_ACTION_ACCESSIBILITY_CHANNEL ,
76
77
SET_ACTIONS_AS_ENABLED_CHANNEL ,
77
78
POST_FILE_CHANNEL ,
79
+ DELETE_FILE_CHANNEL ,
78
80
} = require ( './app/config/channels' ) ;
79
81
const env = require ( './env.json' ) ;
80
82
const {
@@ -104,6 +106,7 @@ const {
104
106
getAppInstanceResources,
105
107
postAppInstanceResource,
106
108
patchAppInstanceResource,
109
+ deleteAppInstanceResource,
107
110
getAppInstance,
108
111
setSyncMode,
109
112
getSyncMode,
@@ -129,6 +132,7 @@ const {
129
132
setActionsAsEnabled,
130
133
windowAllClosed,
131
134
postFile,
135
+ deleteFile,
132
136
} = require ( './app/listeners' ) ;
133
137
const isMac = require ( './app/utils/isMac' ) ;
134
138
@@ -494,6 +498,9 @@ app.on('ready', async () => {
494
498
// called when creating a file
495
499
ipcMain . on ( POST_FILE_CHANNEL , postFile ( mainWindow , db ) ) ;
496
500
501
+ // called when creating a file
502
+ ipcMain . on ( DELETE_FILE_CHANNEL , deleteFile ( mainWindow , db ) ) ;
503
+
497
504
// called when logging in a user
498
505
ipcMain . on ( SIGN_IN_CHANNEL , signIn ( mainWindow , db ) ) ;
499
506
@@ -521,6 +528,12 @@ app.on('ready', async () => {
521
528
patchAppInstanceResource ( mainWindow , db )
522
529
) ;
523
530
531
+ // called when deleting an AppInstanceResource
532
+ ipcMain . on (
533
+ DELETE_APP_INSTANCE_RESOURCE_CHANNEL ,
534
+ deleteAppInstanceResource ( mainWindow , db )
535
+ ) ;
536
+
524
537
// called when getting an AppInstance
525
538
ipcMain . on ( GET_APP_INSTANCE_CHANNEL , getAppInstance ( mainWindow , db ) ) ;
526
539
0 commit comments