mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 17:56:44 +02:00
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:
@@ -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.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user