From d9c93312056cacbac82341840a991affae21b240 Mon Sep 17 00:00:00 2001 From: AZero13 Date: Sat, 6 Dec 2025 14:43:12 -0500 Subject: [PATCH] Do not wait on invoking the collection before returning false. --- src/Calculator/Common/AlwaysSelectedCollectionView.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Calculator/Common/AlwaysSelectedCollectionView.cs b/src/Calculator/Common/AlwaysSelectedCollectionView.cs index 21e7b8f04a..0842ce2765 100644 --- a/src/Calculator/Common/AlwaysSelectedCollectionView.cs +++ b/src/Calculator/Common/AlwaysSelectedCollectionView.cs @@ -44,10 +44,11 @@ public bool MoveCurrentTo(object item) // restore the selection to the way we wanted it to begin with if (CurrentPosition >= 0 && CurrentPosition < m_source.Count) { - Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => + // Fire-and-forget to avoid blocking UI thread / deadlock + _ = Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { CurrentChanged?.Invoke(this, null); - }).AsTask().Wait(); + }); } return false; }