diff --git a/src/App/Controls/AvatarImageSource.cs b/src/App/Controls/AvatarImageSource.cs index ef5d2890a83..1ebe3509a39 100644 --- a/src/App/Controls/AvatarImageSource.cs +++ b/src/App/Controls/AvatarImageSource.cs @@ -11,6 +11,23 @@ public class AvatarImageSource : StreamImageSource { private string _data; + public override bool Equals(object obj) + { + if (obj is null) + { + return false; + } + + if (obj is AvatarImageSource avatar) + { + return avatar._data == _data; + } + + return base.Equals(obj); + } + + public override int GetHashCode() => _data?.GetHashCode() ?? -1; + public AvatarImageSource(string name = null, string email = null) { _data = name;