From 00ae1f58a3a587761d4eed6ff5cfc17e491c8699 Mon Sep 17 00:00:00 2001 From: Oj Date: Thu, 10 Feb 2022 21:11:34 +0000 Subject: [PATCH] [Chore] Revert last commit for CI testing This reverts commit 73bc0650d40e8549b5d7dd60d2271104e56eb474. --- src/splash/index.js | 4 ++++ src/splash/preload.js | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) 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