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

Commit 973c4e8

Browse files
Merge branch 'master' into fixes/sign-out
2 parents 3e3ba0c + 96d6023 commit 973c4e8

File tree

9 files changed

+38
-27
lines changed

9 files changed

+38
-27
lines changed

src/GitHub.Api/RepositoryLocator.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ public void Run()
4343
ApplicationManager.GitClient.Init()
4444
.Then(ApplicationManager.GitClient.SetConfig("merge.unityyamlmerge.cmd", yamlMergeCommand, GitConfigSource.Local))
4545
.Then(ApplicationManager.GitClient.SetConfig("merge.unityyamlmerge.trustExitCode", "false", GitConfigSource.Local))
46-
.Then(ApplicationManager.GitClient.LfsInstall()).Then(new ActionTask(token, _ => {
47-
SetProjectToTextSerialization();
48-
46+
.Then(ApplicationManager.GitClient.LfsInstall())
47+
.ThenInUI(SetProjectToTextSerialization)
48+
.Then(new ActionTask(token, _ => {
4949
AssemblyResources.ToFile(ResourceType.Generic, ".gitignore", targetPath);
5050
AssemblyResources.ToFile(ResourceType.Generic, ".gitattributes", targetPath);
5151

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ private AuthenticationService AuthenticationService
4646
}
4747
}
4848

49-
public override void Initialize(IView parent)
49+
public override void InitializeView(IView parent)
5050
{
51-
base.Initialize(parent);
51+
base.InitializeView(parent);
5252
need2fa = busy = false;
5353
}
5454

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ private void CreateViews()
5555
authView = new AuthenticationView();
5656

5757
Initialize(EntryPoint.ApplicationManager);
58-
authView.Initialize(this);
58+
authView.InitializeView(this);
5959
}
6060

6161
private void ShowActiveView()

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ class BranchesView : Subview
3838
[SerializeField] private Vector2 scroll;
3939
[SerializeField] private BranchTreeNode selectedNode;
4040

41-
public override void Initialize(IView parent)
41+
public override void InitializeView(IView parent)
4242
{
43-
base.Initialize(parent);
43+
base.InitializeView(parent);
4444
targetMode = mode;
4545
}
4646

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ class ChangesView : Subview
2727
[SerializeField] private Vector2 horizontalScroll;
2828
[SerializeField] private ChangesetTreeView tree = new ChangesetTreeView();
2929

30-
public override void Initialize(IView parent)
30+
public override void InitializeView(IView parent)
3131
{
32-
base.Initialize(parent);
33-
tree.Initialize(this);
32+
base.InitializeView(parent);
33+
tree.InitializeView(this);
3434
}
3535

3636
public override void OnShow()

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

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,24 @@ class HistoryView : Subview
5858
[SerializeField] private ChangesetTreeView changesetTree = new ChangesetTreeView();
5959
[SerializeField] private List<GitLogEntry> history = new List<GitLogEntry>();
6060

61-
public override void Initialize(IView parent)
61+
public override void Initialize(IApplicationManager applicationManager)
6262
{
63-
base.Initialize(parent);
63+
base.Initialize(applicationManager);
64+
if (Manager != null)
65+
{
66+
UpdateLog();
67+
}
68+
}
69+
70+
public override void InitializeView(IView parent)
71+
{
72+
Logger.Trace("InitializeView(IView)");
73+
base.InitializeView(parent);
6474

6575
lastWidth = Position.width;
6676
selectionIndex = newSelectionIndex = -1;
6777

68-
changesetTree.Initialize(this);
78+
changesetTree.InitializeView(this);
6979
changesetTree.Readonly = true;
7080

7181
if (Repository != null)

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ class SettingsView : Subview
8383
[SerializeField] private string repositoryRemoteName;
8484
[SerializeField] private string repositoryRemoteUrl;
8585

86-
public override void Initialize(IView parent)
86+
public override void InitializeView(IView parent)
8787
{
88-
base.Initialize(parent);
88+
base.InitializeView(parent);
8989
Setup();
9090
}
9191

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,13 @@ abstract class Subview : IView
9393
protected IEnvironment Environment { get { return Manager != null ? Manager.Environment : null; } }
9494
protected IPlatform Platform { get { return Manager != null ? Manager.Platform : null; } }
9595

96-
void IView.Initialize(IApplicationManager applicationManager)
96+
public virtual void Initialize(IApplicationManager applicationManager)
9797
{
98+
Logger.Trace("Initialize(IApplicationManager: {0})", applicationManager != null);
9899
Manager = applicationManager;
99100
}
100101

101-
public virtual void Initialize(IView parent)
102+
public virtual void InitializeView(IView parent)
102103
{
103104
Debug.Assert(parent != null, NullParentError);
104105
Parent = parent;

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ public override void OnEnable()
7373
// Set window title
7474
titleContent = new GUIContent(Title, Styles.SmallLogo);
7575

76-
historyTab.Initialize(this);
77-
changesTab.Initialize(this);
78-
branchesTab.Initialize(this);
79-
settingsTab.Initialize(this);
76+
historyTab.InitializeView(this);
77+
changesTab.InitializeView(this);
78+
branchesTab.InitializeView(this);
79+
settingsTab.InitializeView(this);
8080
}
8181

8282
public override void Refresh()
@@ -336,11 +336,11 @@ public override void Initialize(IApplicationManager applicationManager)
336336
{
337337
base.Initialize(applicationManager);
338338

339-
HistoryTab.Initialize(this);
340-
ChangesTab.Initialize(this);
341-
BranchesTab.Initialize(this);
342-
SettingsTab.Initialize(this);
343-
ActiveTab.Initialize(this);
339+
HistoryTab.InitializeView(this);
340+
ChangesTab.InitializeView(this);
341+
BranchesTab.InitializeView(this);
342+
SettingsTab.InitializeView(this);
343+
ActiveTab.InitializeView(this);
344344
}
345345
}
346346
}

0 commit comments

Comments
 (0)