1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-04-19 19:34:24 +02:00

fix(mpd): volume slider causing mpd server errors

This commit is contained in:
Jake Stanger 2022-10-16 22:23:40 +01:00
parent cbd0c49e25
commit e693c1c166
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61

View file

@ -340,10 +340,12 @@ impl Module<Button> for MpdModule {
});
let tx_vol = tx;
volume_slider.connect_value_changed(move |slider| {
volume_slider.connect_change_value(move |_, _, val| {
tx_vol
.try_send(PlayerCommand::Volume(slider.value() as u8))
.try_send(PlayerCommand::Volume(val as u8))
.expect("Failed to send volume message");
Inhibit(false)
});
container.show_all();