Skip to content

Commit 3f3eaa4

Browse files
committed
refactor: remove unnecessary converter
Signed-off-by: leo <[email protected]>
1 parent bd7c2fb commit 3f3eaa4

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

src/Converters/ListConverters.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ namespace SourceGit.Converters
77
{
88
public static class ListConverters
99
{
10-
public static readonly FuncValueConverter<IList, string> Count =
11-
new FuncValueConverter<IList, string>(v => v == null ? "0" : $"{v.Count}");
12-
1310
public static readonly FuncValueConverter<IList, string> ToCount =
1411
new FuncValueConverter<IList, string>(v => v == null ? "(0)" : $"({v.Count})");
1512

src/Views/CommitChanges.axaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
55
xmlns:vm="using:SourceGit.ViewModels"
66
xmlns:v="using:SourceGit.Views"
7-
xmlns:c="using:SourceGit.Converters"
87
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
98
x:Class="SourceGit.Views.CommitChanges"
109
x:DataType="vm:CommitDetail">
@@ -59,7 +58,7 @@
5958
<TextBlock Margin="4,0,0,0"
6059
Foreground="{DynamicResource Brush.FG2}"
6160
HorizontalAlignment="Left" VerticalAlignment="Center">
62-
<Run Text="{Binding Changes, Converter={x:Static c:ListConverters.Count}, Mode=OneWay}" FontWeight="Bold"/>
61+
<Run Text="{Binding Changes.Count, Mode=OneWay}" FontWeight="Bold"/>
6362
<Run Text="{DynamicResource Text.CommitDetail.Changes.Count}"/>
6463
</TextBlock>
6564
</Border>

0 commit comments

Comments
 (0)