[Splash > Preload] Minor context bridge tweaks / cleanup

This commit is contained in:
Ducko 2022-03-11 14:18:25 +00:00
parent 352028a4b2
commit 95e62f9d62
2 changed files with 3 additions and 3 deletions

View File

@ -106,7 +106,7 @@
const barContainer = document.querySelector('#bar-container');
const barFill = document.querySelector('#bar-fill');
DiscordSplash.onStateUpdate(({ status, current, total, progress, seconds }) => {
Splash.onState(({ status, current, total, progress, seconds }) => {
let statusText = status.replaceAll('-', ' ');
let showProgress = false;

View File

@ -1,6 +1,6 @@
const { contextBridge, ipcRenderer } = require('electron');
contextBridge.exposeInMainWorld('DiscordSplash', {
onStateUpdate: callback => ipcRenderer.on('SPLASH_STATE', (_, state) => callback(state))
contextBridge.exposeInMainWorld('Splash', {
onState: callback => ipcRenderer.on('SPLASH_STATE', (_, state) => callback(state))
});