CmdPal: immediately move to page, while loading (#42227)

Regressed in #41358

We're synchronously waiting for the first FetchItems to return before
actually navigating to the page. Yikes.

Closes #42157

drive-by:
Closes #42231
Closes #42156
This commit is contained in:
Mike Griese
2025-10-07 19:29:18 -05:00
committed by GitHub
parent 3e213165a8
commit 494901b52d

View File

@@ -206,11 +206,14 @@ public partial class ShellViewModel : ObservableObject,
.ContinueWith(
(Task t) =>
{
// When we're done loading the page, then update the command bar to match
OnUIThread(() => { WeakReferenceMessenger.Default.Send<UpdateCommandBarMessage>(new(null)); });
WeakReferenceMessenger.Default.Send<NavigateToPageMessage>(new(pageViewModel, message.WithAnimation));
},
_scheduler);
// While we're loading in the background, immediately move to the next page.
WeakReferenceMessenger.Default.Send<NavigateToPageMessage>(new(pageViewModel, message.WithAnimation));
// Note: Originally we set our page back in the ViewModel here, but that now happens in response to the Frame navigating triggered from the above
// See RootFrame_Navigated event handler.
}