Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 990143e

Browse files
committed
🎨 Pure code style changes. Not functional.
I can be pretty nitpicky about code and like to clean things up as we go.
1 parent d97ea07 commit 990143e

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/GitHub.App/Controllers/UIController.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
using System;
22
using System.ComponentModel.Composition;
33
using System.Diagnostics;
4+
using System.Reactive.Concurrency;
45
using System.Reactive.Disposables;
56
using System.Reactive.Linq;
67
using System.Reactive.Subjects;
8+
using System.Windows;
79
using System.Windows.Controls;
810
using GitHub.Authentication;
911
using GitHub.Exports;
@@ -15,8 +17,6 @@
1517
using NullGuard;
1618
using ReactiveUI;
1719
using Stateless;
18-
using System.Windows;
19-
using System.Reactive.Concurrency;
2020

2121
namespace GitHub.Controllers
2222
{
@@ -265,10 +265,7 @@ public void Start([AllowNull] IConnection connection)
265265
public void Stop()
266266
{
267267
Debug.WriteLine("Stop ({0})", GetHashCode());
268-
if (machine.IsInState(UIViewType.End))
269-
Fire(Trigger.Next);
270-
else
271-
Fire(Trigger.Cancel);
268+
Fire(machine.IsInState(UIViewType.End) ? Trigger.Next : Trigger.Cancel);
272269
}
273270

274271
bool disposed; // To detect redundant calls
@@ -291,6 +288,6 @@ public void Dispose()
291288
GC.SuppressFinalize(this);
292289
}
293290

294-
public bool IsStopped { get { return machine.IsInState(UIViewType.Finished); } }
291+
public bool IsStopped => machine.IsInState(UIViewType.Finished);
295292
}
296293
}

0 commit comments

Comments
 (0)