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