1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

[PM-3684] Remove ipcRenderer from electron.renderer.messaging (#6480)

This commit is contained in:
Daniel García
2023-10-17 13:41:19 +02:00
committed by GitHub
parent d79ef473c6
commit 1f26f6579d
2 changed files with 12 additions and 8 deletions

View File

@@ -17,6 +17,16 @@ export default {
onSystemThemeUpdated: (callback: (theme: ThemeType) => void) => {
ipcRenderer.on("systemThemeUpdated", (_event, theme: ThemeType) => callback(theme));
},
sendMessage: (message: { command: string } & any) =>
ipcRenderer.send("messagingService", message),
onMessage: (callback: (message: { command: string } & any) => void) => {
ipcRenderer.on("messagingService", (_event, message: any) => {
if (message.command) {
callback(message);
}
});
},
};
function deviceType(): DeviceType {