This commit is contained in:
Burak Kaan Köse
2025-02-20 00:54:46 +01:00
2 changed files with 10 additions and 2 deletions

View File

@@ -18,17 +18,22 @@ public class AccountContactViewModel : AccountContact
/// </summary>
public bool IsMe { get; set; }
/// <summary>
/// Gets or sets whether the ShortNameOrYOu should have semicolon.
/// </summary>
public bool IsSemicolon { get; set; } = true;
/// <summary>
/// Provides a short name of the contact.
/// <see cref="ShortDisplayName"/> or "You"
/// </summary>
public string ShortNameOrYou => IsMe ? $"{Translator.AccountContactNameYou};" : ShortDisplayName;
public string ShortNameOrYou => (IsMe ? Translator.AccountContactNameYou : ShortDisplayName) + (IsSemicolon ? ";" : string.Empty);
/// <summary>
/// Short display name of the contact.
/// Either Name or Address.
/// </summary>
public string ShortDisplayName => Address == Name || string.IsNullOrWhiteSpace(Name) ? $"{Address.ToLowerInvariant()};" : $"{Name};";
public string ShortDisplayName => Address == Name || string.IsNullOrWhiteSpace(Name) ? $"{Address.ToLowerInvariant()}" : $"{Name}";
/// <summary>
/// Display name of the contact in a format: Name <Address>.

View File

@@ -494,6 +494,9 @@ public partial class MailRenderingPageViewModel : MailBaseViewModel,
}
}
if (accounts.Count > 0)
accounts[^1].IsSemicolon = false;
return accounts;
}