From 977a59afb32553c0990a3964404652e9606428dc Mon Sep 17 00:00:00 2001
From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>
Date: Sat, 29 Mar 2025 18:13:21 +1100
Subject: sidebar: allow seeking

---
 src/modules/sidebar/dashboard.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/modules/sidebar/dashboard.tsx')

diff --git a/src/modules/sidebar/dashboard.tsx b/src/modules/sidebar/dashboard.tsx
index c38d584..bad4695 100644
--- a/src/modules/sidebar/dashboard.tsx
+++ b/src/modules/sidebar/dashboard.tsx
@@ -108,7 +108,7 @@ const Media = ({ player }: { player: AstalMpris.Player | null }) => {
                         label="󰒭"
                     />
                 </box>
-                <Slider value={bind(position)} />
+                <Slider value={bind(position)} onChange={(_, v) => player?.set_position(v * player.length)} />
                 <box className="time">
                     <label label={player ? bind(player, "position").as(lengthStr) : "-1:-1"} />
                     <box hexpand />
-- 
cgit v1.2.3-freya

