[verified] feat: follow phone Do Not Disturb for notification wake

This commit is contained in:
MasterControl committed 2026-11-11 17:43:35 +00:00
1 parent 54ba6b4f10
commit 9ca3574ae7
14 files changed
+574 -20

No files matched your search

+2
View File
@@ -75,6 +75,7 @@ import { ShellModalLayer } from "./modal-layer";
import { NotificationModalQueue } from "./notification-modal-queue";
import { NotificationPopupTimeout } from "./notification-popup-timeout";
import { ALL_NOTIFICATIONS, readActiveNotifications } from "../../native/notification-icons";
import { isPhoneDoNotDisturbEnabled } from "../../native/phone-do-not-disturb";
import { ToolDebugMenuLayer } from "./tool-debug-layer";
import type { InProcessWindow } from "./in-process-window";
import { BrightnessPickerLayer } from "./brightness-picker-layer";
@@ -939,6 +940,7 @@ class Shell {
* shown: in the notification modal, waking the screen for it if it was off.
*/
postAppNotification(notification: AppNotification): void {
if (!this.screenOn && isPhoneDoNotDisturbEnabled()) return;
this.appNotifications.set(notification.key, notification);
const wokeScreen = this.screenOn ? false : this.wake("sidebar");
this.openNotificationModal(notification.key, wokeScreen);