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

Commit 14a24cf

Browse files
Changing activeTab using nextTab at the right time
1 parent 0a64264 commit 14a24cf

File tree

1 file changed

+17
-1
lines changed
  • src/UnityExtension/Assets/Editor/GitHub.Unity/UI

1 file changed

+17
-1
lines changed

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

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,15 @@ private bool MaybeUpdateData(out string repoRemote)
197197
bool repoDataChanged = false;
198198
if (Repository != null)
199199
{
200+
if (activeTab == SubTab.InitProject)
201+
{
202+
if (!nextTab.HasValue || nextTab.Value == SubTab.InitProject)
203+
{
204+
nextTab = SubTab.History;
205+
repoDataChanged = true;
206+
}
207+
}
208+
200209
var currentBranchString = (Repository.CurrentBranch.HasValue ? Repository.CurrentBranch.Value.Name : null);
201210
if (repoBranch != currentBranchString)
202211
{
@@ -216,7 +225,14 @@ private bool MaybeUpdateData(out string repoRemote)
216225
}
217226
else
218227
{
219-
nextTab = SubTab.InitProject;
228+
if (activeTab != SubTab.InitProject)
229+
{
230+
if (!nextTab.HasValue || nextTab.Value != SubTab.InitProject)
231+
{
232+
nextTab = SubTab.InitProject;
233+
repoDataChanged = true;
234+
}
235+
}
220236

221237
if (repoBranch != null)
222238
{

0 commit comments

Comments
 (0)