From 52ee8362bd94ad031ca8ebd567737b92ede5247e Mon Sep 17 00:00:00 2001 From: retrozinndev Date: Sun, 31 Aug 2025 12:40:52 -0300 Subject: [PATCH] :boom: fix(osd): create function is implicitly ran on gnim component --- src/window/OSD.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/window/OSD.tsx b/src/window/OSD.tsx index 9627967..8264482 100644 --- a/src/window/OSD.tsx +++ b/src/window/OSD.tsx @@ -37,7 +37,7 @@ export class OSDMode extends GObject.Object { } } -export const OSDModes: Record OSDMode> = { +export const OSDModes = { SINK: () => new OSDMode({ icon: createBinding(Wireplumber.getWireplumber().defaultSpeaker, "volumeIcon"), value: createBinding(Wireplumber.getWireplumber().defaultSpeaker, "volume"), @@ -66,9 +66,9 @@ export const OSD = (mon: number) => anchor={Astal.WindowAnchor.BOTTOM} focusable={false} marginBottom={80} monitor={mon}> - - {(modeFun: () => OSDMode) => { - const mode = modeFun(); + f)}> + {(_: () => OSDMode) => { + const mode = _ as unknown as OSDMode; // for some reason, gnim runs this function :broken_heart: return