refactor: new way to display item count

This commit is contained in:
leo 2025-05-13 17:50:47 +08:00
parent ac1bd7ca85
commit cf7b61dd71
No known key found for this signature in database
5 changed files with 60 additions and 47 deletions

View file

@ -8,7 +8,7 @@ namespace SourceGit.Converters
public static class ListConverters
{
public static readonly FuncValueConverter<IList, string> ToCount =
new FuncValueConverter<IList, string>(v => v == null ? " (0)" : $" ({v.Count})");
new FuncValueConverter<IList, string>(v => v == null ? "(0)" : $"({v.Count})");
public static readonly FuncValueConverter<IList, bool> IsNullOrEmpty =
new FuncValueConverter<IList, bool>(v => v == null || v.Count == 0);