diff --git a/src/splash/index.js b/src/splash/index.js index 0692ca8..cee10f8 100644 --- a/src/splash/index.js +++ b/src/splash/index.js @@ -427,6 +427,10 @@ function launchSplashWindow(startMinimized) { } }); + ipcMain.on('DISCORD_SPLASH_SCREEN_QUIT', () => { + _electron.app.quit(); + }); + const splashUrl = _url.default.format({ protocol: 'file', slashes: true, diff --git a/src/splash/preload.js b/src/splash/preload.js index f21f1cc..38c6c2b 100644 --- a/src/splash/preload.js +++ b/src/splash/preload.js @@ -3,5 +3,8 @@ const { contextBridge, ipcRenderer } = require('electron'); 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)), + + quitDiscord: () => ipcRenderer.send('DISCORD_SPLASH_SCREEN_QUIT') }); \ No newline at end of file