Removed unused constructor. Added default value for empty commit hash
This commit is contained in:
@@ -18,17 +18,13 @@ public class MoonlightService
|
||||
private readonly DateTime StartTimestamp = DateTime.UtcNow;
|
||||
private readonly CoreEvents CoreEvents;
|
||||
private readonly ILogger<MoonlightService> Logger;
|
||||
|
||||
|
||||
public MoonlightService(CoreEvents coreEvents, ILogger<MoonlightService> logger)
|
||||
{
|
||||
CoreEvents = coreEvents;
|
||||
Logger = logger;
|
||||
}
|
||||
|
||||
public MoonlightService()
|
||||
{
|
||||
|
||||
//TODO: Maybe extract to a method to make this a bit cleaner
|
||||
|
||||
if (File.Exists("version"))
|
||||
{
|
||||
var line = File.ReadAllText("version");
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<div class="col-md-3 col-12">
|
||||
@{
|
||||
var commitHashShorted = string.IsNullOrEmpty(MoonlightService.BuildCommitHash) || MoonlightService.BuildCommitHash.Length < 7
|
||||
? ""
|
||||
? "N/A"
|
||||
: MoonlightService.BuildCommitHash.Substring(0, 7);
|
||||
|
||||
// TODO: Add update check (possible during startup, with error handling etc)
|
||||
|
||||
Reference in New Issue
Block a user