From 927874961144a96994f4bb1b33afc264d38a1925 Mon Sep 17 00:00:00 2001 From: Oj Date: Sun, 13 Mar 2022 13:05:28 +0000 Subject: [PATCH] [Splash > Backend] Tweak backend-preload IPC --- src/splash/index.js | 2 +- src/splash/preload.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/splash/index.js b/src/splash/index.js index 989b955..a4c8b2a 100644 --- a/src/splash/index.js +++ b/src/splash/index.js @@ -76,7 +76,7 @@ const launchMainWindow = () => { const sendState = (status) => { try { - splashWindow.webContents.send('SPLASH_STATE', { status, ...splashState }); + splashWindow.webContents.send('state', { status, ...splashState }); } catch (_e) {} }; diff --git a/src/splash/preload.js b/src/splash/preload.js index 7795232..e02f213 100644 --- a/src/splash/preload.js +++ b/src/splash/preload.js @@ -2,5 +2,5 @@ const { contextBridge, ipcRenderer } = require('electron'); contextBridge.exposeInMainWorld('Splash', { - onState: callback => ipcRenderer.on('SPLASH_STATE', (_, state) => callback(state)) + onState: callback => ipcRenderer.on('state', (_, state) => callback(state)) }); \ No newline at end of file