From d084356630768fb23a2a538ec1e32404c1874598 Mon Sep 17 00:00:00 2001 From: Andreia Gaita Date: Wed, 23 May 2018 19:22:30 +0200 Subject: [PATCH 1/2] isBusy should not be serialized Otherwise the UI might get locked out if Unity reloads in the middle of an operation --- .../Assets/Editor/GitHub.Unity/UI/ChangesView.cs | 2 +- src/UnityExtension/Assets/Editor/GitHub.Unity/UI/LocksView.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/ChangesView.cs b/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/ChangesView.cs index b7421a381..0a94770eb 100644 --- a/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/ChangesView.cs +++ b/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/ChangesView.cs @@ -23,6 +23,7 @@ class ChangesView : Subview [SerializeField] private bool currentLocksHasUpdate; [NonSerialized] private GUIContent discardGuiContent; + [NonSerialized] private bool isBusy; [SerializeField] private string commitBody = ""; [SerializeField] private string commitMessage = ""; @@ -39,7 +40,6 @@ class ChangesView : Subview [SerializeField] private CacheUpdateEvent lastCurrentBranchChangedEvent; [SerializeField] private CacheUpdateEvent lastStatusEntriesChangedEvent; [SerializeField] private CacheUpdateEvent lastLocksChangedEvent; - [SerializeField] private bool isBusy; public override void OnEnable() { diff --git a/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/LocksView.cs b/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/LocksView.cs index 8717f7aff..5d06f7cc7 100644 --- a/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/LocksView.cs +++ b/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/LocksView.cs @@ -372,6 +372,8 @@ public bool OnSelectionChange() [Serializable] class LocksView : Subview { + [NonSerialized] private bool isBusy; + [SerializeField] private bool currentStatusEntriesHasUpdate; [SerializeField] private bool currentLocksHasUpdate; [SerializeField] private bool currentUserHasUpdate; @@ -382,7 +384,6 @@ class LocksView : Subview [SerializeField] private List lockedFiles = new List(); [SerializeField] private List gitStatusEntries = new List(); [SerializeField] private string currentUsername; - [SerializeField] private bool isBusy; [SerializeField] private GUIContent unlockFileMenuContent = new GUIContent(Localization.UnlockFileMenuItem); [SerializeField] private GUIContent forceUnlockFileMenuContent = new GUIContent(Localization.ForceUnlockFileMenuItem); From 2d1fa5d2f8fa7d5f1afdf4161b11b0f82d52c5ae Mon Sep 17 00:00:00 2001 From: Andreia Gaita Date: Wed, 23 May 2018 19:33:58 +0200 Subject: [PATCH 2/2] Remove debug logging from release code --- src/UnityExtension/Assets/Editor/GitHub.Unity/UI/Window.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/Window.cs b/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/Window.cs index 6fdd93f40..34e2b5228 100644 --- a/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/Window.cs +++ b/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/Window.cs @@ -415,7 +415,6 @@ public override void UpdateProgress(IProgress progress) private void ApplicationManagerOnProgress(IProgress progress) { - Debug.LogFormat("ApplicationManagerOnProgress {0} {1}", progress.Percentage, progress.Message); appManagerProgress = progress; appManagerProgressHasUpdate = true; }