Compare commits
No commits in common. "1fea2a2e1186d258193aeb309872e167b9f388b7" and "84a9a890746f52521543969b390f96a46955ac52" have entirely different histories.
1fea2a2e11
...
84a9a89074
@ -70,7 +70,6 @@ public class DialAction : EncoderBase
|
||||
_thread.Start();
|
||||
|
||||
_currentAudioSession = settings.FallbackBehavior == FallbackBehavior.SystemSounds ? _audioHelper.GetSystemSounds() : _audioHelper.GetSystemVolume();
|
||||
_ = UpdateStateIfNeeded();
|
||||
}
|
||||
|
||||
public override async void DialDown(DialPayload payload)
|
||||
@ -175,34 +174,26 @@ public class DialAction : EncoderBase
|
||||
|
||||
private async Task UpdateStateIfNeeded()
|
||||
{
|
||||
try
|
||||
if (_currentAudioSession != null)
|
||||
{
|
||||
|
||||
if (_currentAudioSession != null)
|
||||
var uiState = new UIState(_currentAudioSession);
|
||||
|
||||
if (_previousState != null && uiState != null &&
|
||||
uiState.Title == _previousState.Title &&
|
||||
uiState.Value.Value == _previousState.Value.Value &&
|
||||
uiState.Value.Opacity == _previousState.Value.Opacity &&
|
||||
uiState.Indicator.Value == _previousState.Indicator.Value &&
|
||||
uiState.Indicator.Opacity == _previousState.Indicator.Opacity &&
|
||||
uiState.icon.Value == _previousState.icon.Value &&
|
||||
uiState.icon.Opacity == _previousState.icon.Opacity
|
||||
)
|
||||
{
|
||||
|
||||
var uiState = new UIState(_currentAudioSession);
|
||||
|
||||
if (_previousState != null && uiState != null &&
|
||||
uiState.Title == _previousState.Title &&
|
||||
uiState.Value.Value == _previousState.Value.Value &&
|
||||
uiState.Value.Opacity == _previousState.Value.Opacity &&
|
||||
uiState.Indicator.Value == _previousState.Indicator.Value &&
|
||||
uiState.Indicator.Opacity == _previousState.Indicator.Opacity &&
|
||||
uiState.icon.Value == _previousState.icon.Value &&
|
||||
uiState.icon.Opacity == _previousState.icon.Opacity
|
||||
)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
await Connection.SetFeedbackAsync(uiState);
|
||||
_previousState = uiState;
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (Exception ex )
|
||||
{
|
||||
Logger.Instance.LogMessage(TracingLevel.ERROR, $"Failed to update screen\n {ex}");
|
||||
|
||||
await Connection.SetFeedbackAsync(uiState);
|
||||
_previousState = uiState;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
"Name": "Focused Application Volume",
|
||||
"Description": "Control the volume of the focused application",
|
||||
"URL": "https://github.com/dlprows/FocusVolumeControl",
|
||||
"Version": "1.1.0",
|
||||
"Version": "1.0.1",
|
||||
"CodePath": "FocusVolumeControl",
|
||||
"Category": "Volume Control [dlprows]",
|
||||
"Icon": "Images/pluginIcon",
|
||||
|
Loading…
Reference in New Issue
Block a user