Skip to content

Commit

Permalink
ignore volume changes while muted
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonoughe committed Feb 17, 2019
1 parent 48731d2 commit 1119a21
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/sb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,10 @@ pub fn watch(logger: &Logger) -> Result<mpsc::Receiver<Result<ChangeEvent, Win32
event_tx.send(event).unwrap();
}
Ok(SoundCoreOrVolumeEvent::Volume(VolumeNotification {
volume, ..
})) => event_tx.send(Ok(ChangeEvent::Volume(volume))).unwrap(),
volume,
is_muted,
..
})) if !is_muted => event_tx.send(Ok(ChangeEvent::Volume(volume))).unwrap(),
Ok(_) => {}
Err(error) => event_tx.send(Err(error)).unwrap(),
}
Expand Down

0 comments on commit 1119a21

Please sign in to comment.