Handle dismissed notifications

This commit is contained in:
James Babcock committed 2026-06-07 11:57:13 -07:00
1 parent 958861c24b
commit ec924f7909
2 files changed
+45 -10

No files matched your search

+10 -1
View File
@@ -178,10 +178,19 @@ export function openAndroidNotificationFromSleep(notificationKey: string, nowMs
dashboardState.tiledWakePaintPending = wakeModeSetting.get() === "tiled";
dashboardLayers.clearToBase();
dashboardLayers.push(createRootMenuLayer());
dashboardLayers.push(new SingleNotificationLayer(notificationKey));
dashboardLayers.push(new SingleNotificationLayer(notificationKey, {
origin: "new-notification-trigger",
closeNewNotificationTrigger: closeNewNotificationTrigger,
}));
return true;
}
function closeNewNotificationTrigger(ctx: LayerContext): void {
dashboardState.screenOn = false;
dashboardState.tiledWakePaintPending = false;
ctx.stack.clearToBase();
}
export function resetDashboardSleepTimerAndWake(nowMs = Date.now()): boolean {
dashboardState.lastInputAtMs = nowMs;
if (dashboardState.screenOn) return false;