Added no subject handler (#451)
* Added no subject handler changed text trimming for address to CharacterEllipsis * Make email subject selectable.
This commit is contained in:
@@ -119,7 +119,7 @@
|
||||
x:Name="SenderTextFromAddress"
|
||||
Grid.Column="1"
|
||||
Text="{x:Bind MailItem.FromAddress}"
|
||||
TextTrimming="WordEllipsis"
|
||||
TextTrimming="CharacterEllipsis"
|
||||
Visibility="{x:Bind helpers:XamlHelpers.StringToVisibilityReversedConverter(MailItem.FromName)}" />
|
||||
|
||||
<!-- Hover button -->
|
||||
@@ -193,7 +193,7 @@
|
||||
x:Name="TitleText"
|
||||
Grid.Column="1"
|
||||
MaxLines="1"
|
||||
Text="{x:Bind MailItem.Subject}"
|
||||
Text="{x:Bind helpers:XamlHelpers.GetMailItemSubject(MailItem.Subject)}"
|
||||
TextTrimming="CharacterEllipsis" />
|
||||
|
||||
<TextBlock
|
||||
|
||||
@@ -57,6 +57,7 @@ namespace Wino.Helpers
|
||||
return prefer24HourTime ? localTime.ToString(TwentyFourHourTimeFormat) : localTime.ToString(TwelveHourTimeFormat);
|
||||
}
|
||||
}
|
||||
public static string GetMailItemSubject(string subject) => string.IsNullOrWhiteSpace(subject) ? $"({Translator.MailItemNoSubject})" : subject;
|
||||
public static string GetCreationDateString(DateTime date, bool prefer24HourTime)
|
||||
{
|
||||
var localTime = date.ToLocalTime();
|
||||
|
||||
@@ -179,7 +179,8 @@
|
||||
VerticalAlignment="Center"
|
||||
FontSize="18"
|
||||
FontWeight="SemiBold"
|
||||
Text="{x:Bind ViewModel.Subject, Mode=OneWay}"
|
||||
IsTextSelectionEnabled="True"
|
||||
Text="{x:Bind helpers:XamlHelpers.GetMailItemSubject( ViewModel.Subject), Mode=OneWay}"
|
||||
TextWrapping="Wrap" />
|
||||
|
||||
<HyperlinkButton
|
||||
|
||||
Reference in New Issue
Block a user