mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-21 13:20:30 +08:00
refactor: remove unnecessary converter
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
@@ -7,9 +7,6 @@ namespace SourceGit.Converters
|
||||
{
|
||||
public static class ListConverters
|
||||
{
|
||||
public static readonly FuncValueConverter<IList, string> Count =
|
||||
new FuncValueConverter<IList, string>(v => v == null ? "0" : $"{v.Count}");
|
||||
|
||||
public static readonly FuncValueConverter<IList, string> ToCount =
|
||||
new FuncValueConverter<IList, string>(v => v == null ? "(0)" : $"({v.Count})");
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:vm="using:SourceGit.ViewModels"
|
||||
xmlns:v="using:SourceGit.Views"
|
||||
xmlns:c="using:SourceGit.Converters"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="SourceGit.Views.CommitChanges"
|
||||
x:DataType="vm:CommitDetail">
|
||||
@@ -59,7 +58,7 @@
|
||||
<TextBlock Margin="4,0,0,0"
|
||||
Foreground="{DynamicResource Brush.FG2}"
|
||||
HorizontalAlignment="Left" VerticalAlignment="Center">
|
||||
<Run Text="{Binding Changes, Converter={x:Static c:ListConverters.Count}, Mode=OneWay}" FontWeight="Bold"/>
|
||||
<Run Text="{Binding Changes.Count, Mode=OneWay}" FontWeight="Bold"/>
|
||||
<Run Text="{DynamicResource Text.CommitDetail.Changes.Count}"/>
|
||||
</TextBlock>
|
||||
</Border>
|
||||
|
||||
Reference in New Issue
Block a user