mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-17 12:18:00 +01:00
Improve error handling, debouncing, and code cleanup
Enhanced exception handling in RelayCommand to improve robustness. Standardized slider debounce delays using a new constant `SliderDebounceDelayMs`. Improved resource management in SimpleDebouncer with proper disposal of CancellationTokenSource and added support for synchronous actions. Refactored event handling in App.xaml.cs for clarity and consistency. Removed redundant logging in MonitorStateManager and MainViewModel to reduce verbosity. Updated namespaces and dependencies for better organization. General code cleanup to improve readability and maintainability.
This commit is contained in:
@@ -73,8 +73,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
{
|
||||
Logger.LogInfo("Received refresh monitors event from PowerDisplay.exe");
|
||||
ReloadMonitorsFromSettings();
|
||||
},
|
||||
_cancellationTokenSource.Token);
|
||||
});
|
||||
}
|
||||
|
||||
private void InitializeEnabledValue()
|
||||
|
||||
Reference in New Issue
Block a user