forked from Blendman974/faceclaw
[verified] feat: follow phone Do Not Disturb for notification wake
This commit is contained in:
1 parent
54ba6b4f10
commit
9ca3574ae7
14 files changed
+574
-20
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user