Skip to content

Commit baf28f1

Browse files
committed
code_style: build worktree list in background thread
Signed-off-by: leo <longshuang@msn.cn>
1 parent 90dd88a commit baf28f1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ViewModels/Repository.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1076,7 +1076,8 @@ public void RefreshWorktrees()
10761076
Task.Run(async () =>
10771077
{
10781078
var worktrees = await new Commands.Worktree(FullPath).ReadAllAsync().ConfigureAwait(false);
1079-
Dispatcher.UIThread.Invoke(() => Worktrees = Worktree.Build(FullPath, worktrees));
1079+
var cleaned = Worktree.Build(FullPath, worktrees);
1080+
Dispatcher.UIThread.Invoke(() => Worktrees = cleaned);
10801081
});
10811082
}
10821083

0 commit comments

Comments
 (0)