Skip to content

Commit

Permalink
Fix bug with invalid date in updates window
Browse files Browse the repository at this point in the history
  • Loading branch information
Deadpikle committed Jun 12, 2023
1 parent 0c51fa5 commit 4acd6de
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/NetSparkle/ReleaseNotesGrabber.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ public virtual async Task<string> DownloadAllReleaseNotes(List<AppCastItem> item
var releaseNotes = await GetReleaseNotes(castItem, _sparkle, cancellationToken);
sb.Append(string.Format((hasAddedFirstItem ? "<br/>" : "") + ReleaseNotesTemplate,
castItem.Version,
castItem.PublicationDate.ToString(DateFormat), // was dd MMM yyyy
castItem.PublicationDate != DateTime.MinValue && castItem.PublicationDate != DateTime.MaxValue
? castItem.PublicationDate.ToString(DateFormat)
: "", // was dd MMM yyyy
releaseNotes,
latestVersion.Version.Equals(castItem.Version) ? "#ABFF82" : "#AFD7FF"));
hasAddedFirstItem = true; // after first item added, need to add line breaks between release note items
Expand Down

0 comments on commit 4acd6de

Please sign in to comment.