Added more handling when fromName is null or empty (#399)

This commit is contained in:
Tiktack
2024-09-27 01:06:57 +02:00
committed by GitHub
parent 939b395dcd
commit 9aa1de11af
4 changed files with 25 additions and 11 deletions

View File

@@ -208,10 +208,15 @@
Command="{Binding ElementName=root, Path=ViewModel.CopyClipboardCommand}"
CommandParameter="{x:Bind ViewModel.FromAddress, Mode=OneWay}"
FontWeight="SemiBold">
<TextBlock>
<Run Text="{x:Bind ViewModel.FromName, Mode=OneWay}" />
<Run Text="&lt;" /><Run Text="{x:Bind ViewModel.FromAddress, Mode=OneWay}" /><Run Text="&gt;" />
</TextBlock>
<Grid>
<TextBlock Visibility="{x:Bind helpers:XamlHelpers.StringToVisibilityConverter(ViewModel.FromName), Mode=OneWay}">
<Run Text="{x:Bind ViewModel.FromName, Mode=OneWay}" />
<Run Text="&lt;" /><Run Text="{x:Bind ViewModel.FromAddress, Mode=OneWay}" /><Run Text="&gt;" />
</TextBlock>
<TextBlock Visibility="{x:Bind helpers:XamlHelpers.StringToVisibilityReversedConverter(ViewModel.FromName), Mode=OneWay}">
<Run Text="{x:Bind ViewModel.FromAddress, Mode=OneWay}" />
</TextBlock>
</Grid>
</HyperlinkButton>
<TextBlock FontSize="12" Text="{x:Bind helpers:XamlHelpers.GetCreationDateString(ViewModel.CreationDate, ViewModel.PreferencesService.Prefer24HourTimeFormat), Mode=OneWay}" />
</StackPanel>