Removed unused constructor. Added default value for empty commit hash

This commit is contained in:
Marcel Baumgartner
2024-07-06 13:16:10 +02:00
parent 333346889d
commit bd189caf80
2 changed files with 3 additions and 7 deletions

View File

@@ -23,12 +23,8 @@ public class MoonlightService
{
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");

View File

@@ -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)