mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-07-01 10:41:03 +02:00
fix(mpd): volume slider causing mpd server errors
This commit is contained in:
parent
cbd0c49e25
commit
e693c1c166
1 changed files with 4 additions and 2 deletions
|
@ -340,10 +340,12 @@ impl Module<Button> for MpdModule {
|
||||||
});
|
});
|
||||||
|
|
||||||
let tx_vol = tx;
|
let tx_vol = tx;
|
||||||
volume_slider.connect_value_changed(move |slider| {
|
volume_slider.connect_change_value(move |_, _, val| {
|
||||||
tx_vol
|
tx_vol
|
||||||
.try_send(PlayerCommand::Volume(slider.value() as u8))
|
.try_send(PlayerCommand::Volume(val as u8))
|
||||||
.expect("Failed to send volume message");
|
.expect("Failed to send volume message");
|
||||||
|
|
||||||
|
Inhibit(false)
|
||||||
});
|
});
|
||||||
|
|
||||||
container.show_all();
|
container.show_all();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue