fixed mute bug
This commit is contained in:
parent
0cb56ba024
commit
fb8f18b405
|
|
@ -38,10 +38,14 @@ fn step(directon: Direction) { //onscroll
|
|||
}
|
||||
/// Takes [u8] (saved_volume) and replaces the current volume with the value.
|
||||
/// The current volume is stored within the `mute_save` eww variable.
|
||||
fn toggle_mute(saved_volume: u8) { //onclick
|
||||
fn toggle_mute(mut saved_volume: u8) { //onclick
|
||||
use super::update_eww_var;
|
||||
|
||||
let volume = get_current_value();
|
||||
if saved_volume > 0 && volume > 0 {
|
||||
saved_volume = 0;
|
||||
}
|
||||
|
||||
set(saved_volume, Direction::Absolute);
|
||||
update_eww_var("mute_save", &volume.to_string());
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue