feat: Make RatchetMapKey internal

This commit is contained in:
2022-08-08 14:28:02 +02:00
parent dd96e840d4
commit 9a9c9f064b
2 changed files with 19 additions and 16 deletions

View File

@@ -0,0 +1,18 @@
import 'package:meta/meta.dart';
@internal
@immutable
class RatchetMapKey {
const RatchetMapKey(this.jid, this.deviceId);
final String jid;
final int deviceId;
@override
bool operator ==(Object other) {
return other is RatchetMapKey && jid == other.jid && deviceId == other.deviceId;
}
@override
int get hashCode => jid.hashCode ^ deviceId.hashCode;
}