💥 fix(osd): closing when it wasn't supposed to be closing

This commit is contained in:
retrozinndev
2025-04-05 20:52:50 -03:00
parent 8bb7d502af
commit 3c1e6616ce
+5 -4
View File
@@ -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;
}