From 0a180cffa6207323ae2ec318131b80d424b6fa8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20W=C3=A4scher?= Date: Wed, 31 Aug 2022 17:16:40 +0200 Subject: [PATCH] Improve form text when no logs are available --- Fusion++/Forms/MainForm.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Fusion++/Forms/MainForm.cs b/Fusion++/Forms/MainForm.cs index e12794e..d1a0bb0 100644 --- a/Fusion++/Forms/MainForm.cs +++ b/Fusion++/Forms/MainForm.cs @@ -177,7 +177,8 @@ private async Task LoadLogsAsync(ILogStore logStore) else SetOverlayState(OverlayState.Empty); - Text = $"{logStore.GetLogName(logStore.Path)} - {GetAppNameWithVersion()}"; + var logName = logStore.GetLogName(logStore.Path); + Text = string.IsNullOrEmpty(logName) ? GetAppNameWithVersion() : $"{logName} - {GetAppNameWithVersion()}"; } private bool Validate(IEnumerable logs)