fix(desktop): restore notification sounds (#2582)

Restore desktop notification sounds by default, add a persisted Play sound setting, and group notification permission and testing in a dedicated Notifications section.
This commit is contained in:
Glen Stampoultzis
2026-08-08 22:28:37 +02:00
committed by GitHub
parent b19db9537c
commit b9b3a24d58
24 changed files with 451 additions and 123 deletions
@@ -1,6 +1,7 @@
import path from "node:path";
import { existsSync } from "node:fs";
import { app, BrowserWindow, Notification, ipcMain, nativeImage } from "electron";
import { getDesktopSettingsStore } from "../settings/desktop-settings-electron.js";
interface NotificationInput {
title?: unknown;
@@ -95,11 +96,12 @@ export function registerNotificationHandlers(): void {
const body = toTrimmedString(rawInput?.body) ?? undefined;
const data = toRecord(rawInput?.data);
const icon = getNotificationIcon();
const settings = await getDesktopSettingsStore().get();
const notification = new Notification({
title,
...(body ? { body } : {}),
...(icon ? { icon } : {}),
silent: true,
silent: !settings.notifications.playSound,
});
activeNotifications.add(notification);