From 85b5b397ae74fd08d66e89ee3ee132520ccb1d0d Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 5 Feb 2015 08:50:31 -0600 Subject: Making sure to record the output and volume for each invocation --- src/service.vala | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/service.vala') diff --git a/src/service.vala b/src/service.vala index 22cb1c6..c942fc7 100644 --- a/src/service.vala +++ b/src/service.vala @@ -285,16 +285,18 @@ public class IndicatorSound.Service: Object { if (!support_sync_notification) return; - /* Suppress notifications of volume changes if it is because the - output stream changed. */ + /* Update our volume and output */ var oldoutput = this.last_output_notification; this.last_output_notification = this.volume_control.stream; - if (oldoutput != this.last_output_notification) - return; - /* Supress updates that don't change the value */ var oldvolume = this.last_volume_notification; this.last_volume_notification = volume_control.volume; + + /* Suppress notifications of volume changes if it is because the + output stream changed. */ + if (oldoutput != this.last_output_notification) + return; + /* Supress updates that don't change the value */ if (oldvolume == this.last_volume_notification) return; -- cgit v1.2.3