mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-09 04:37:30 +02:00
[oobe] fix scoobe page threading issues (#16532)
This commit is contained in:
@@ -85,15 +85,26 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views
|
|||||||
TitleTxt.Text = loader.GetString("Oobe_WhatsNew");
|
TitleTxt.Text = loader.GetString("Oobe_WhatsNew");
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ReleaseNotesMarkdown.Text = await GetReleaseNotesMarkdown();
|
string releaseNotesMarkdown = await GetReleaseNotesMarkdown();
|
||||||
ReleaseNotesMarkdown.Visibility = Windows.UI.Xaml.Visibility.Visible;
|
|
||||||
LoadingProgressRing.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
|
// Make sure we run in the UI thread. await doesn't seem to guarantee it.
|
||||||
|
await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
|
||||||
|
{
|
||||||
|
ReleaseNotesMarkdown.Text = releaseNotesMarkdown;
|
||||||
|
ReleaseNotesMarkdown.Visibility = Windows.UI.Xaml.Visibility.Visible;
|
||||||
|
LoadingProgressRing.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Logger.LogError("Exception when loading the release notes", ex);
|
Logger.LogError("Exception when loading the release notes", ex);
|
||||||
LoadingProgressRing.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
|
|
||||||
ErrorInfoBar.Visibility = Windows.UI.Xaml.Visibility.Visible;
|
// Make sure we run in the UI thread. await doesn't seem to guarantee it.
|
||||||
|
await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
|
||||||
|
{
|
||||||
|
LoadingProgressRing.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
|
||||||
|
ErrorInfoBar.Visibility = Windows.UI.Xaml.Visibility.Visible;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user