Refactoring the html editor toolbar.
This commit is contained in:
@@ -11,7 +11,7 @@ namespace Wino.Core.Domain.Entities.Shared;
|
||||
|
||||
// TODO: This can easily evolve to Contact store, just like People app in Windows 10/11.
|
||||
// Do it.
|
||||
public class AccountContact : IEquatable<AccountContact>
|
||||
public class AccountContact : IEquatable<AccountContact>, IContactDisplayItem
|
||||
{
|
||||
/// <summary>
|
||||
/// E-mail address of the contact.
|
||||
@@ -43,6 +43,9 @@ public class AccountContact : IEquatable<AccountContact>
|
||||
/// </summary>
|
||||
public bool IsOverridden { get; set; } = false;
|
||||
|
||||
public string DisplayName => string.IsNullOrWhiteSpace(Name) ? Address : Name;
|
||||
AccountContact IContactDisplayItem.PreviewContact => this;
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return Equals(obj as AccountContact);
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Wino.Core.Domain.Entities.Shared;
|
||||
|
||||
public interface IContactDisplayItem
|
||||
{
|
||||
string DisplayName { get; }
|
||||
string Address { get; }
|
||||
AccountContact PreviewContact { get; }
|
||||
}
|
||||
Reference in New Issue
Block a user