Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/GitHub.Api/Git/GitBranch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ public struct GitBranch : ITreeData
public string tracking;
public bool isActive;

public string Name { get { return name; } }
public string Tracking { get { return tracking; } }
public bool IsActive { get { return isActive; } }

public GitBranch(string name, string tracking, bool active)
{
Guard.ArgumentNotNullOrWhiteSpace(name, "name");
Expand All @@ -30,6 +26,10 @@ public GitBranch(string name, string tracking, bool active)
this.isActive = active;
}

public string Name => name;
public string Tracking => tracking;
public bool IsActive => isActive;

public override string ToString()
{
return $"{Name} Tracking? {Tracking} Active? {IsActive}";
Expand Down
39 changes: 0 additions & 39 deletions src/UnityExtension/Assets/Editor/GitHub.Unity/UI/BranchesView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -358,13 +358,9 @@ private void OnTreeGUI(Rect rect)
});

if (treeHadFocus && treeRemotes.SelectedNode == null)
{
treeLocals.Focus();
}
else if (!treeHadFocus && treeRemotes.SelectedNode != null)
{
treeLocals.Blur();
}

if (treeRemotes.RequiresRepaint)
Redraw();
Expand All @@ -375,16 +371,6 @@ private void OnTreeGUI(Rect rect)

private int CompareBranches(GitBranch a, GitBranch b)
{
//if (IsFavorite(a.Name))
//{
// return -1;
//}

//if (IsFavorite(b.Name))
//{
// return 1;
//}

if (a.Name.Equals("master"))
{
return -1;
Expand All @@ -398,31 +384,6 @@ private int CompareBranches(GitBranch a, GitBranch b)
return a.Name.CompareTo(b.Name);
}

//private bool IsFavorite(string branchName)
//{
// return !String.IsNullOrEmpty(branchName) && favoritesList.Contains(branchName);
//}

//private void SetFavorite(TreeNode branch, bool favorite)
//{
// if (string.IsNullOrEmpty(branch.Name))
// {
// return;
// }

// if (!favorite)
// {
// favorites.Remove(branch);
// Manager.LocalSettings.Set(FavoritesSetting, favorites.Select(x => x.Name).ToList());
// }
// else
// {
// favorites.Remove(branch);
// favorites.Add(branch);
// Manager.LocalSettings.Set(FavoritesSetting, favorites.Select(x => x.Name).ToList());
// }
//}

public override bool IsBusy
{
get { return false; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,9 @@ public bool Render(Rect rect, float indentation, bool isSelected, GUIStyle folde
{
nodeStyle.Draw(fillRect, GUIContent.none, false, false, false, isSelected);
if (IsFolder)
{
style.Draw(nodeRect, content, false, false, !IsCollapsed, isSelected);
}
else
{
style.Draw(nodeRect, content, false, false, false, isSelected);
Expand Down