enhance: expand tree for current branch (#262)

This commit is contained in:
leo 2024-07-16 15:02:47 +08:00
parent 72ca571c00
commit 2f5f98770f
No known key found for this signature in database

View file

@ -152,6 +152,8 @@ namespace SourceGit.ViewModels
if (folders.TryGetValue(folder, out var val)) if (folders.TryGetValue(folder, out var val))
{ {
lastFolder = val; lastFolder = val;
if (!lastFolder.IsExpanded)
lastFolder.IsExpanded |= (branch.IsCurrent || _expanded.Contains(folder));
} }
else if (lastFolder == null) else if (lastFolder == null)
{ {