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

Commit e13e4b5

Browse files
committed
Remove unused code
1 parent e344577 commit e13e4b5

File tree

3 files changed

+7
-61
lines changed

3 files changed

+7
-61
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ class GitPathView : Subview
3838
public override void OnEnable()
3939
{
4040
base.OnEnable();
41-
4241
gitExecHasChanged = true;
4342
}
4443

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

Lines changed: 2 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ class InitProjectView : Subview
1616
[SerializeField] private UserSettingsView userSettingsView = new UserSettingsView();
1717
[SerializeField] private GitPathView gitPathView = new GitPathView();
1818
[SerializeField] private bool isBusy;
19-
[SerializeField] private bool isPublished;
2019

2120
public override void InitializeView(IView parent)
2221
{
@@ -25,51 +24,12 @@ public override void InitializeView(IView parent)
2524
gitPathView.InitializeView(this);
2625
}
2726

28-
public override void OnEnable()
29-
{
30-
base.OnEnable();
31-
userSettingsView.OnEnable();
32-
gitPathView.OnEnable();
33-
}
34-
35-
public override void OnDisable()
36-
{
37-
base.OnDisable();
38-
userSettingsView.OnDisable();
39-
gitPathView.OnDisable();
40-
}
41-
4227
public override void OnDataUpdate()
4328
{
4429
base.OnDataUpdate();
4530

46-
if (userSettingsView != null)
47-
{
48-
userSettingsView.OnDataUpdate();
49-
}
50-
51-
if (gitPathView != null)
52-
{
53-
gitPathView.OnDataUpdate();
54-
}
55-
}
56-
57-
public override void OnRepositoryChanged(IRepository oldRepository)
58-
{
59-
base.OnRepositoryChanged(oldRepository);
60-
61-
userSettingsView.OnRepositoryChanged(oldRepository);
62-
gitPathView.OnRepositoryChanged(oldRepository);
63-
64-
Refresh();
65-
}
66-
67-
public override void Refresh()
68-
{
69-
base.Refresh();
70-
71-
userSettingsView.Refresh();
72-
gitPathView.Refresh();
31+
userSettingsView.OnDataUpdate();
32+
gitPathView.OnDataUpdate();
7333
}
7434

7535
public override void OnGUI()
@@ -136,11 +96,6 @@ public override void OnGUI()
13696
GUILayout.EndVertical();
13797
}
13898

139-
private void MaybeUpdateData()
140-
{
141-
isPublished = Repository != null && Repository.CurrentRemote.HasValue;
142-
}
143-
14499
public override bool IsBusy
145100
{
146101
get { return isBusy || userSettingsView.IsBusy || gitPathView.IsBusy; }

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

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ class UserSettingsView : Subview
2121

2222
[SerializeField] private string gitName;
2323
[SerializeField] private string gitEmail;
24-
2524
[SerializeField] private string newGitName;
2625
[SerializeField] private string newGitEmail;
2726
[SerializeField] private User cachedUser;
@@ -32,13 +31,6 @@ public override void OnDataUpdate()
3231
MaybeUpdateData();
3332
}
3433

35-
public override void OnRepositoryChanged(IRepository oldRepository)
36-
{
37-
base.OnRepositoryChanged(oldRepository);
38-
39-
Refresh();
40-
}
41-
4234
public override void OnGUI()
4335
{
4436
GUILayout.Label(GitConfigTitle, EditorStyles.boldLabel);
@@ -108,11 +100,6 @@ public override void OnGUI()
108100
EditorGUI.EndDisabledGroup();
109101
}
110102

111-
public override bool IsBusy
112-
{
113-
get { return isBusy; }
114-
}
115-
116103
private void MaybeUpdateData()
117104
{
118105
if (Repository == null)
@@ -154,5 +141,10 @@ private void MaybeUpdateData()
154141
newGitName = gitName = Repository.User.Name;
155142
newGitEmail = gitEmail = Repository.User.Email;
156143
}
144+
145+
public override bool IsBusy
146+
{
147+
get { return isBusy; }
148+
}
157149
}
158150
}

0 commit comments

Comments
 (0)