Announce support for badge overlays

This commit is contained in:
Half-Shot
2025-07-14 13:11:16 +01:00
parent ad8287112b
commit 7d488cc06d
+5 -1
View File
@@ -55,13 +55,17 @@ contextBridge.exposeInMainWorld("electron", {
sessionId: string; sessionId: string;
config: IConfigOptions; config: IConfigOptions;
supportedSettings: Record<string, boolean>; supportedSettings: Record<string, boolean>;
/**
* Do we need to render badge overlays for new notifications?
*/
supportsBadgeOverlay: boolean;
}> { }> {
const [{ protocol, sessionId }, config, supportedSettings] = await Promise.all([ const [{ protocol, sessionId }, config, supportedSettings] = await Promise.all([
ipcRenderer.invoke("getProtocol"), ipcRenderer.invoke("getProtocol"),
ipcRenderer.invoke("getConfig"), ipcRenderer.invoke("getConfig"),
ipcRenderer.invoke("getSupportedSettings"), ipcRenderer.invoke("getSupportedSettings"),
]); ]);
return { protocol, sessionId, config, supportedSettings }; return { protocol, sessionId, config, supportedSettings, supportsBadgeOverlay: process.platform === "win32" };
}, },
async setSettingValue(settingName: string, value: any): Promise<void> { async setSettingValue(settingName: string, value: any): Promise<void> {