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

Commit 0a64264

Browse files
Fixing Window.MaybeUpdateData not to return true every time when Repo is null
1 parent 1737049 commit 0a64264

File tree

1 file changed

+12
-7
lines changed
  • src/UnityExtension/Assets/Editor/GitHub.Unity/UI

1 file changed

+12
-7
lines changed

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

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -217,15 +217,20 @@ private bool MaybeUpdateData(out string repoRemote)
217217
else
218218
{
219219
nextTab = SubTab.InitProject;
220-
repoBranch = null;
221-
repoUrl = null;
222-
}
223220

224-
if (repoUrl == null)
225-
{
226-
repoUrl = DefaultRepoUrl;
227-
repoDataChanged = true;
221+
if (repoBranch != null)
222+
{
223+
repoBranch = null;
224+
repoDataChanged = true;
225+
}
226+
227+
if (repoUrl != DefaultRepoUrl)
228+
{
229+
repoUrl = DefaultRepoUrl;
230+
repoDataChanged = true;
231+
}
228232
}
233+
229234
return repoDataChanged;
230235
}
231236

0 commit comments

Comments
 (0)