diff --git a/electron/main.ts b/electron/main.ts index c5a993b3b..8c8b10418 100644 --- a/electron/main.ts +++ b/electron/main.ts @@ -578,7 +578,6 @@ let voiceState: VoiceState = { serverName: null, }; -let isUserSignedIn = false; let uiohookRunning = false; let startHiddenOnLaunch = false; let localServer: Server | null = null; @@ -2292,11 +2291,7 @@ function createMainWindow(): BrowserWindow { ); mainWindow.on("close", (event) => { - if ( - !isQuitting && - closeToTray && - isUserSignedIn - ) { + if (!isQuitting && closeToTray) { event.preventDefault(); mainWindow?.hide(); } @@ -3418,14 +3413,6 @@ if (!gotSingleInstanceLock) { } ); - ipcMain.on( - "set-signed-in", - (_event, signedIn: boolean) => { - isUserSignedIn = - signedIn; - } - ); - ipcMain.on( "set-voice-state", (_event, next: VoiceState) => { diff --git a/electron/preload.ts b/electron/preload.ts index ed3becb18..a7b48bb13 100644 --- a/electron/preload.ts +++ b/electron/preload.ts @@ -262,10 +262,6 @@ contextBridge.exposeInMainWorld("electronAPI", { ipcRenderer.send("set-close-to-tray", enabled); }, - setSignedIn(signedIn: boolean) { - ipcRenderer.send("set-signed-in", signedIn); - }, - setVoiceState(state: { inVoice: boolean; muted: boolean; diff --git a/src/lib/electron.ts b/src/lib/electron.ts index 3e26056dd..8d957773b 100644 --- a/src/lib/electron.ts +++ b/src/lib/electron.ts @@ -295,7 +295,6 @@ export interface ElectronAPI { getCloseToTray(): Promise; setCloseToTray(enabled: boolean): void; - setSignedIn(signedIn: boolean): void; /** * Tell the tray what voice is doing. The main process has no other route: mute * and deafen are renderer settings and the SFU connection is a renderer concern. diff --git a/src/packages/common/src/hooks/useAccount.tsx b/src/packages/common/src/hooks/useAccount.tsx index 9f8ace03e..0abf8bbc9 100644 --- a/src/packages/common/src/hooks/useAccount.tsx +++ b/src/packages/common/src/hooks/useAccount.tsx @@ -57,12 +57,6 @@ function useAccountHook(): Account { /* Set once the retry has its answer or somebody signs out, so it never starts twice. */ const retryDone = useRef(false); - useEffect(() => { - if (isSignedIn == null) return; - const api = getElectronAPI(); - api?.setSignedIn(isSignedIn); - }, [isSignedIn]); - // Wire up the Electron deep-link listener useEffect(() => { if (!isElectron()) return;