Skip to content

Commit

Permalink
fix(treeviewlist): make DispatcherHerlper use DispatcherQueue which f…
Browse files Browse the repository at this point in the history
…ixes setting IsExpanded in PrepareContainerForItemOverride
  • Loading branch information
ramezgerges committed Sep 22, 2023
1 parent 5ca42a7 commit 92913c2
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/Uno.UI/Helpers/WinUI/DispatchHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,16 @@ public DispatcherHelper(DependencyObject dependencyObject = null)

public void RunAsync(Action func, bool fallbackToThisThread = false)
{
// TODO: Uno specific - dispatcher queue is not implemented yet
if (false)//dispatcherQueue != null)
if (dispatcherQueue != null)
{
//var result = dispatcherQueue.TryEnqueue(() => func());
//if (!result)
//{
// if (fallbackToThisThread)
// {
// func();
// }
//}
var result = dispatcherQueue.TryEnqueue(() => func());
if (!result)
{
if (fallbackToThisThread)
{
func();
}
}
}
else if (coreDispatcher != null)
{
Expand Down

0 comments on commit 92913c2

Please sign in to comment.