From a09ae1316d959f86eb907c1d1c55dbe686bc55b9 Mon Sep 17 00:00:00 2001 From: MBucari Date: Fri, 25 Jul 2025 16:01:48 -0600 Subject: [PATCH] Don't display null file versions --- Source/LibationUiBase/GridView/LastDownloadStatus.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/LibationUiBase/GridView/LastDownloadStatus.cs b/Source/LibationUiBase/GridView/LastDownloadStatus.cs index 87972d42..be77d007 100644 --- a/Source/LibationUiBase/GridView/LastDownloadStatus.cs +++ b/Source/LibationUiBase/GridView/LastDownloadStatus.cs @@ -29,11 +29,12 @@ namespace LibationUiBase.GridView public override string ToString() => IsValid ? $""" - {dateString()} (File v.{LastDownloadedFileVersion}) + {dateString()} {versionString()} {LastDownloadedFormat} Libation v{LastDownloadedVersion.ToString(3)} """ : ""; - + + private string versionString() => LastDownloadedFileVersion is string ver ? $"(File v.{ver})" : ""; //Call ToShortDateString to use current culture's date format. private string dateString() => $"{LastDownloaded.Value.ToShortDateString()} {LastDownloaded.Value:HH:mm}";