[Settings]Fix "Diagnostic Data Viewer" UI freeze (#35681)

fix UI freeze
This commit is contained in:
Davide Giacometti 2024-10-31 09:15:42 +01:00 committed by GitHub
parent 9e3a19804c
commit 7382f1836f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -159,9 +159,9 @@ namespace Microsoft.PowerToys.Settings.UI.Views
ViewModel.RefreshSettingsOnExternalChange(); 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);
} }
} }
} }