forked from Blendman974/faceclaw
Handle dismissed notifications
This commit is contained in:
1 parent
958861c24b
commit
ec924f7909
2 files changed
+45
-10
No files matched your search
+10
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user