💥 fix(osd): closing when it wasn't supposed to be closing
This commit is contained in:
+5
-4
@@ -52,7 +52,7 @@ App.start({
|
|||||||
|
|
||||||
connections.set(Wireplumber.getDefault(), [
|
connections.set(Wireplumber.getDefault(), [
|
||||||
Wireplumber.getDefault().getDefaultSink().connect("notify::volume", () =>
|
Wireplumber.getDefault().getDefaultSink().connect("notify::volume", () =>
|
||||||
!Windows.isVisible("osd") && triggerOSD(OSDModes.SINK))
|
triggerOSD(OSDModes.SINK))
|
||||||
]);
|
]);
|
||||||
|
|
||||||
connections.set(Notifications.getDefault(), [
|
connections.set(Notifications.getDefault(), [
|
||||||
@@ -70,14 +70,15 @@ App.start({
|
|||||||
});
|
});
|
||||||
|
|
||||||
function triggerOSD(osdModeParam: OSDModes) {
|
function triggerOSD(osdModeParam: OSDModes) {
|
||||||
setOSDMode(osdModeParam);
|
Windows.open("osd");
|
||||||
|
|
||||||
if(!osdTimer) {
|
if(!osdTimer) {
|
||||||
Windows.open("osd");
|
setOSDMode(osdModeParam);
|
||||||
osdTimer = timeout(3000, () => {
|
osdTimer = timeout(3000, () => {
|
||||||
Windows.close("osd");
|
|
||||||
osdTimer = undefined;
|
osdTimer = undefined;
|
||||||
|
Windows.close("osd");
|
||||||
});
|
});
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user