From 7382f1836f73912ca1c8a998d8eeeae93d60c7e9 Mon Sep 17 00:00:00 2001 From: Davide Giacometti <25966642+davidegiacometti@users.noreply.github.com> Date: Thu, 31 Oct 2024 09:15:42 +0100 Subject: [PATCH] [Settings]Fix "Diagnostic Data Viewer" UI freeze (#35681) fix UI freeze --- .../Settings.UI/SettingsXAML/Views/GeneralPage.xaml.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/GeneralPage.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/Views/GeneralPage.xaml.cs index e8e89cc7cd..a7b0bcf5dc 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Views/GeneralPage.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/GeneralPage.xaml.cs @@ -159,9 +159,9 @@ namespace Microsoft.PowerToys.Settings.UI.Views ViewModel.RefreshSettingsOnExternalChange(); } - private void ViewDiagnosticData_Click(object sender, RoutedEventArgs e) + private async void ViewDiagnosticData_Click(object sender, RoutedEventArgs e) { - ViewModel.ViewDiagnosticData(); + await Task.Run(ViewModel.ViewDiagnosticData); } } }