Skip to content

Commit 92aa6d9

Browse files
authored
Merge pull request #121 from Rekkonnect/dev/fix/recursive-expansion
Fix recursive expansion
2 parents 88086ba + 64bda4d commit 92aa6d9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Syndiesis/Controls/AnalysisVisualization/AnalysisTreeListNode.axaml.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,13 @@ public async Task RequestInitializedChildren(bool flag)
160160

161161
public async Task RequestInitializedChildren()
162162
{
163-
if (_childRetriever is null)
163+
if (_childRetrievalTask is not null)
164+
{
165+
await _childRetrievalTask;
164166
return;
167+
}
165168

166-
if (_childRetriever.IsValueCreated)
169+
if (HasLoadedChildren)
167170
return;
168171

169172
_childRetrievalTask = ChildRetrievalTaskWorker();
@@ -394,7 +397,7 @@ public async Task ExpandRecursivelyAsync(int depth)
394397
if (depth <= 0)
395398
return;
396399

397-
Dispatcher.UIThread.Invoke(Expand);
400+
await Dispatcher.UIThread.InvokeAsync(Expand);
398401
await RequestInitializedChildren();
399402
var taskList = new List<Task>();
400403
foreach (var node in LazyChildren)

0 commit comments

Comments
 (0)