Displaying contact picture for rendering page and small adjustments for addresses UI.
This commit is contained in:
@@ -104,6 +104,9 @@ namespace Wino.Mail.ViewModels
|
||||
[ObservableProperty]
|
||||
private string fromName;
|
||||
|
||||
[ObservableProperty]
|
||||
private string contactPicture;
|
||||
|
||||
[ObservableProperty]
|
||||
private DateTime creationDate;
|
||||
|
||||
@@ -417,6 +420,7 @@ namespace Wino.Mail.ViewModels
|
||||
FromAddress = message.From.Mailboxes.FirstOrDefault()?.Address ?? Translator.UnknownAddress;
|
||||
FromName = message.From.Mailboxes.FirstOrDefault()?.Name ?? Translator.UnknownSender;
|
||||
CreationDate = message.Date.DateTime;
|
||||
ContactPicture = initializedMailItemViewModel.SenderContact?.Base64ContactPicture;
|
||||
|
||||
// Extract to,cc and bcc
|
||||
await LoadAddressInfoAsync(message.To, ToItems);
|
||||
|
||||
@@ -31,7 +31,8 @@
|
||||
|
||||
<DataTemplate x:Key="InternetAddressTemplate" x:DataType="entities:AccountContact">
|
||||
<HyperlinkButton
|
||||
Padding="2"
|
||||
Padding="4,2"
|
||||
Margin="-2,-2"
|
||||
Command="{Binding ElementName=root, Path=ViewModel.CopyClipboardCommand}"
|
||||
CommandParameter="{x:Bind Address}"
|
||||
Content="{x:Bind DisplayName}" />
|
||||
@@ -228,6 +229,7 @@
|
||||
Width="36"
|
||||
Height="36"
|
||||
FontSize="16"
|
||||
SenderContactPicture="{x:Bind ViewModel.ContactPicture, Mode=OneWay}"
|
||||
FromAddress="{x:Bind ViewModel.FromAddress, Mode=OneWay}"
|
||||
FromName="{x:Bind ViewModel.FromName, Mode=OneWay}" />
|
||||
|
||||
@@ -237,7 +239,8 @@
|
||||
VerticalAlignment="Center">
|
||||
<StackPanel Spacing="1">
|
||||
<HyperlinkButton
|
||||
Padding="-2,0"
|
||||
Padding="4,2"
|
||||
Margin="-6,-2"
|
||||
Command="{Binding ElementName=root, Path=ViewModel.CopyClipboardCommand}"
|
||||
CommandParameter="{x:Bind ViewModel.FromAddress, Mode=OneWay}"
|
||||
FontWeight="SemiBold">
|
||||
|
||||
Reference in New Issue
Block a user