Removed unused preload channels

This commit is contained in:
RemixDev 2022-05-28 15:22:40 +02:00
parent 475ccfc850
commit f279ed43b5

View file

@ -9,13 +9,13 @@ contextBridge.exposeInMainWorld(
"api", {
send: (channel, data) => {
// whitelist channels
let validChannels = ["openDownloadsFolder", "applogin", "selectDownloadFolder"];
let validChannels = ["openDownloadsFolder", "selectDownloadFolder"];
if (validChannels.includes(channel)) {
ipcRenderer.send(channel, data);
}
},
receive: (channel, func) => {
let validChannels = ["downloadFolderSelected", "applogin_arl"];
let validChannels = ["downloadFolderSelected"];
if (validChannels.includes(channel)) {
// Deliberately strip event as it includes `sender`
ipcRenderer.on(channel, (event, ...args) => func(...args));