Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 185573c

Browse files
Simplying branch updating
1 parent cead15a commit 185573c

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/BranchesView.cs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ class BranchesView : Subview
4040

4141
[NonSerialized] private List<BranchTreeNode> favorites = new List<BranchTreeNode>();
4242
[NonSerialized] private int listID = -1;
43-
[NonSerialized] private List<GitBranch> newLocalBranches;
4443
[NonSerialized] private BranchTreeNode newNodeSelection;
4544
[NonSerialized] private BranchesMode targetMode;
4645
[NonSerialized] private bool favoritesHasChanged;
@@ -137,8 +136,7 @@ public void UpdateBranches()
137136
if (Repository == null)
138137
return;
139138

140-
OnLocalBranchesUpdate(Repository.LocalBranches);
141-
OnRemoteBranchesUpdate(Repository.RemoteBranches);
139+
BuildTree(Repository.LocalBranches, Repository.RemoteBranches);
142140
}
143141

144142
public override void OnGUI()
@@ -292,17 +290,6 @@ private bool IsFavorite(string branchName)
292290
return !String.IsNullOrEmpty(branchName) && favoritesList.Contains(branchName);
293291
}
294292

295-
private void OnLocalBranchesUpdate(IEnumerable<GitBranch> list)
296-
{
297-
newLocalBranches = new List<GitBranch>(list);
298-
}
299-
300-
private void OnRemoteBranchesUpdate(IEnumerable<GitBranch> newRemoteBranches)
301-
{
302-
BuildTree(newLocalBranches, newRemoteBranches);
303-
newLocalBranches.Clear();
304-
}
305-
306293
private void BuildTree(IEnumerable<GitBranch> local, IEnumerable<GitBranch> remote)
307294
{
308295
//Clear the selected node

0 commit comments

Comments
 (0)