mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: add account updated listener
This commit is contained in:
parent
44fd971c95
commit
d866face54
6 changed files with 28 additions and 6 deletions
|
@ -299,6 +299,11 @@ contextBridge.exposeInMainWorld("electron", {
|
|||
ipcRenderer.on("on-signin", listener);
|
||||
return () => ipcRenderer.removeListener("on-signin", listener);
|
||||
},
|
||||
onAccountUpdated: (cb: () => void) => {
|
||||
const listener = (_event: Electron.IpcRendererEvent) => cb();
|
||||
ipcRenderer.on("on-account-updated", listener);
|
||||
return () => ipcRenderer.removeListener("on-account-updated", listener);
|
||||
},
|
||||
onSignOut: (cb: () => void) => {
|
||||
const listener = (_event: Electron.IpcRendererEvent) => cb();
|
||||
ipcRenderer.on("on-signout", listener);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue