From ff126420e966359b9fcc6574a6ad2bc2d8468b82 Mon Sep 17 00:00:00 2001 From: Oj Date: Wed, 2 Feb 2022 08:37:06 +0000 Subject: [PATCH] [Splash > Preload] Tweak source --- src/splash/preload.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/splash/preload.js b/src/splash/preload.js index 874e0d1..ab15b9d 100644 --- a/src/splash/preload.js +++ b/src/splash/preload.js @@ -6,11 +6,7 @@ const { saferShellOpenExternal } = require('../utils/securityUtils'); contextBridge.exposeInMainWorld('DiscordSplash', { signalReady: () => ipcRenderer.send('DISCORD_SPLASH_SCREEN_READY'), - onStateUpdate: callback => { - ipcRenderer.on('DISCORD_SPLASH_UPDATE_STATE', (_, state) => { - callback(state); - }); - }, + onStateUpdate: callback => ipcRenderer.on('DISCORD_SPLASH_UPDATE_STATE', (_, state) => callback(state)), openUrl: saferShellOpenExternal, quitDiscord: () => ipcRenderer.send('DISCORD_SPLASH_SCREEN_QUIT')