From 3c1e6616cec3a44304a399a7d6ece6891eb7b302 Mon Sep 17 00:00:00 2001 From: retrozinndev Date: Sat, 5 Apr 2025 20:52:50 -0300 Subject: [PATCH] :boom: fix(osd): closing when it wasn't supposed to be closing --- ags/app.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ags/app.ts b/ags/app.ts index 8c86412..abe9d57 100644 --- a/ags/app.ts +++ b/ags/app.ts @@ -52,7 +52,7 @@ App.start({ connections.set(Wireplumber.getDefault(), [ Wireplumber.getDefault().getDefaultSink().connect("notify::volume", () => - !Windows.isVisible("osd") && triggerOSD(OSDModes.SINK)) + triggerOSD(OSDModes.SINK)) ]); connections.set(Notifications.getDefault(), [ @@ -70,14 +70,15 @@ App.start({ }); function triggerOSD(osdModeParam: OSDModes) { - setOSDMode(osdModeParam); + Windows.open("osd"); if(!osdTimer) { - Windows.open("osd"); + setOSDMode(osdModeParam); osdTimer = timeout(3000, () => { - Windows.close("osd"); osdTimer = undefined; + Windows.close("osd"); }); + return; }