From 09af1d1f890f24e9b02d13acd05f63e73d7e53fc Mon Sep 17 00:00:00 2001 From: Zamitto <167933696+zamitto@users.noreply.github.com> Date: Thu, 31 Oct 2024 17:19:58 -0300 Subject: [PATCH] feat: remove unused code --- src/main/services/notifications/xml.ts | 27 ++++---------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/src/main/services/notifications/xml.ts b/src/main/services/notifications/xml.ts index 4e8bb826..4c7b36e2 100644 --- a/src/main/services/notifications/xml.ts +++ b/src/main/services/notifications/xml.ts @@ -5,12 +5,12 @@ export interface NotificationOptions { duration?: "short" | "long"; silent?: boolean; progress?: { - title?: string; status?: string; value: number; valueOverride: string; }; } + function escape(string: string) { return string.replace(/[<>&'"]/g, (match) => { switch (match) { @@ -30,35 +30,17 @@ function escape(string: string) { }); } -function addAttributeOrTrim(name, value) { +function addAttributeOrTrim(name: string, value: string) { return value ? `${name}="${value}" ` : ""; } -const Activation = { - types: [ - "protocol", - "background", - "foreground", - "system", //system call such as alarm (snooze/dismiss), also used by Notification Visualizer - ], - behavior: ["default", "pendingUpdate"], -}; - -const Scenarios = [ - "default", - "alarm", - "reminder", - "incomingCall", - "urgent", //win10/11 22h2 -]; - export function toXmlString(options: NotificationOptions) { let template = ""; //Visual @@ -75,7 +57,6 @@ export function toXmlString(options: NotificationOptions) { "