From 9e5a78fb784757cceed7288f2652ddd5dab69adb Mon Sep 17 00:00:00 2001 From: Stanley Goldman Date: Thu, 31 Aug 2017 11:53:21 -0400 Subject: [PATCH] Fixing Window.MaybeUpdateData not to return true every time when Repo is null --- .../Assets/Editor/GitHub.Unity/UI/Window.cs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/Window.cs b/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/Window.cs index 2f44339db..109d10497 100644 --- a/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/Window.cs +++ b/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/Window.cs @@ -211,15 +211,19 @@ private bool MaybeUpdateData(out string repoRemote) } else if (!HasRepository) { - repoBranch = null; - repoUrl = null; - } + if (repoBranch != null) + { + repoBranch = null; + repoDataChanged = true; + } - if (repoUrl == null) - { - repoUrl = DefaultRepoUrl; - repoDataChanged = true; + if (repoUrl != DefaultRepoUrl) + { + repoUrl = DefaultRepoUrl; + repoDataChanged = true; + } } + return repoDataChanged; }