From 371cb82f691edfe6eee6c18c55341eaa567c7602 Mon Sep 17 00:00:00 2001 From: Jamie Hodgson Date: Sat, 15 Apr 2023 10:22:03 +0200 Subject: [PATCH] add ranking to comparer --- .../src/Comparer/WearAuthenticatorComparer.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/AuthenticatorPro.WearOS/src/Comparer/WearAuthenticatorComparer.cs b/AuthenticatorPro.WearOS/src/Comparer/WearAuthenticatorComparer.cs index 361af086d3..739e00683c 100644 --- a/AuthenticatorPro.WearOS/src/Comparer/WearAuthenticatorComparer.cs +++ b/AuthenticatorPro.WearOS/src/Comparer/WearAuthenticatorComparer.cs @@ -55,7 +55,8 @@ public bool Equals(WearAuthenticator x, WearAuthenticator y) var isEqual = !differentCategories && x.Type == y.Type && x.Secret == y.Secret && x.Icon == y.Icon && x.Issuer == y.Issuer && x.Username == y.Username && x.Period == y.Period && - x.Digits == y.Digits && x.Algorithm == y.Algorithm && x.Pin == y.Pin && x.CopyCount == y.CopyCount; + x.Digits == y.Digits && x.Algorithm == y.Algorithm && x.Pin == y.Pin && + x.Ranking == y.Ranking && x.CopyCount == y.CopyCount; return isEqual; } @@ -73,6 +74,7 @@ public int GetHashCode(WearAuthenticator obj) hash.Add(obj.Digits); hash.Add(obj.Algorithm); hash.Add(obj.Categories); + hash.Add(obj.Ranking); hash.Add(obj.CopyCount); return hash.ToHashCode();