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

Commit ddae27c

Browse files
committed
Only show the spinner on initialization. Fix the spinner position.
1 parent 0c934a2 commit ddae27c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/GitHub.Api/Application/ApplicationManagerBase.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ public void Run(bool firstRun)
5555
{
5656
Logger.Trace("Run - CurrentDirectory {0}", NPath.CurrentDirectory);
5757

58+
isBusy = true;
59+
5860
var gitExecutablePath = SystemSettings.Get(Constants.GitInstallPathKey)?.ToNPath();
5961
if (gitExecutablePath.HasValue && gitExecutablePath.Value.FileExists()) // we have a git path
6062
{
@@ -65,7 +67,6 @@ public void Run(bool firstRun)
6567
{
6668
Logger.Trace("No git path found in settings");
6769

68-
isBusy = true;
6970
var initEnvironmentTask = new ActionTask<NPath>(CancellationToken,
7071
(b, path) => InitializeEnvironment(path)) { Affinity = TaskAffinity.UI };
7172
var findExecTask = new FindExecTask("git", CancellationToken)
@@ -81,7 +82,6 @@ public void Run(bool firstRun)
8182
//Logger.Warning("FindExecTask Failure");
8283
Logger.Error("Git not found");
8384
}
84-
isBusy = false;
8585
});
8686

8787
var gitInstaller = new GitInstaller(Environment, CancellationToken);
@@ -248,7 +248,7 @@ public void Dispose()
248248
public ISettings SystemSettings { get; protected set; }
249249
public ISettings UserSettings { get; protected set; }
250250
public IUsageTracker UsageTracker { get; protected set; }
251-
public bool IsBusy { get { return isBusy || (RepositoryManager?.IsBusy ?? false); } }
251+
public bool IsBusy { get { return isBusy; } }
252252
protected TaskScheduler UIScheduler { get; private set; }
253253
protected SynchronizationContext SynchronizationContext { get; private set; }
254254
protected IRepositoryManager RepositoryManager { get { return repositoryManager; } }

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ public override void OnUI()
226226

227227
spinner.Render();
228228

229-
rect = new Rect(0f, 0f, Position.width, Position.height - rect.height);
229+
rect = new Rect(0f, rect.y + rect.height, Position.width, Position.height - (rect.height + rect.y));
230230
rect = spinner.Layout(rect);
231231
rect.y += rect.height + 30;
232232
rect.height = 20;
@@ -575,7 +575,7 @@ private Subview ActiveView
575575

576576
public override bool IsBusy
577577
{
578-
get { return Manager.IsBusy || ActiveView.IsBusy; }
578+
get { return Manager.IsBusy; }
579579
}
580580

581581
private enum SubTab

0 commit comments

Comments
 (0)