xmpp: Fix JID.hashCode

This commit is contained in:
PapaTutuWawa 2022-07-28 21:56:00 +02:00
parent 0314c65482
commit 99fd8aae7c

View File

@ -96,8 +96,6 @@ class JID {
@override @override
// ignore: hash_and_equals // ignore: hash_and_equals
// NOTE: I really don't want to implement my own hashCode. Just let [Object] do its
// magic
bool operator ==(Object other) { bool operator ==(Object other) {
if (other is JID) { if (other is JID) {
return other.local == local && other.domain == domain && other.resource == resource; return other.local == local && other.domain == domain && other.resource == resource;
@ -106,7 +104,6 @@ class JID {
return false; return false;
} }
/// I have no idea if that is correct.
@override @override
int get hashCode => local.hashCode + domain.hashCode + resource.hashCode; int get hashCode => local.hashCode ^ domain.hashCode ^ resource.hashCode;
} }