Skip to content

Commit

Permalink
Show zero download counts as blank in ConsoleUI
Browse files Browse the repository at this point in the history
  • Loading branch information
HebaruSan committed Oct 5, 2024
1 parent d7f561c commit d85f54b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ConsoleUI/ModListScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ public ModListScreen(ConsoleTheme theme,
new ConsoleListBoxColumn<CkanModule>(
Properties.Resources.ModListDownloadsHeader,
m => repoData.GetDownloadCount(registry.Repositories.Values, m.identifier)
?.ToString()
?? "",
is int i and > 0
? i.ToString() : "",
(a, b) => (repoData.GetDownloadCount(registry.Repositories.Values, a.identifier) ?? 0)
.CompareTo(repoData.GetDownloadCount(registry.Repositories.Values, b.identifier) ?? 0),
12),
Expand Down

0 comments on commit d85f54b

Please sign in to comment.