Skip to content

Commit 2d87043

Browse files
committed
typed_ipc: Add duration param to toggle-dnd RendererMessage as well as add new toggle-dnd-request RenderMessage.
Introduces an optional duration parameter to the toggle-dnd-request message, enabling the renderer to specify a time value for automatically reverting Do Not Disturb (DND) mode. The toggle-dnd-request event is now used to send this duration from the client to the main process. The toggle-dnd response has been updated to include the duration, allowing the renderer to reflect the timeout state accurately.
1 parent 15902e5 commit 2d87043

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/common/typed-ipc.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,12 @@ export type RendererMessage = {
6969
autoHideMenubar: boolean,
7070
updateMenu: boolean,
7171
) => void;
72-
"toggle-dnd": (state: boolean, newSettings: Partial<DndSettings>) => void;
72+
"toggle-dnd-request": (duration?: number) => void;
73+
"toggle-dnd": (
74+
state: boolean,
75+
newSettings: Partial<DndSettings>,
76+
duration?: number,
77+
) => void;
7378
"toggle-sidebar": (show: boolean) => void;
7479
"toggle-silent": (state: boolean) => void;
7580
"toggle-tray": (state: boolean) => void;

0 commit comments

Comments
 (0)