Skip to content

Commit

Permalink
Only display the indicator when setting volume with keyboard shortcuts.
Browse files Browse the repository at this point in the history
  • Loading branch information
fgimian committed Sep 18, 2021
1 parent 494a1a9 commit 08f5083
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions source/TotalMixVC.GUI/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,6 @@ private async Task ReceiveVolumeAsync()
// Switch to the background thread to avoid UI interruptions.
await TaskScheduler.Default;

// Obtain the initialized state before setting the volume.
bool initializedBeforeReceive = _volumeManager.IsVolumeInitialized;

// The device sends a ping roughly every 2 seconds (usually a pinch over
// 2 seconds), so we'll timeout at 3 seconds to be on the safe side.
bool received = await _volumeManager
Expand All @@ -161,13 +158,6 @@ await _volumeIndicator
.UpdateVolumeAsync(
_volumeManager.Volume, _volumeManager.VolumeDecibels)
.ConfigureAwait(false);

if (initializedBeforeReceive)
{
await _volumeIndicator
.DisplayCurrentVolumeAsync()
.ConfigureAwait(false);
}
}

// Switch to the UI thread and update the tray tooltip text.
Expand Down

0 comments on commit 08f5083

Please sign in to comment.