Store mailbox cache by AccountId
(cherry picked from commit 7804f19d27d65af855e145de1953df9a553f3ce0)
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
|
||||
class TupleKey {
|
||||
final List<String> parts;
|
||||
|
||||
TupleKey(
|
||||
String key1,
|
||||
[
|
||||
String? key2,
|
||||
String? key3
|
||||
]
|
||||
) : parts = [
|
||||
key1,
|
||||
if (key2 != null) key2,
|
||||
if (key3 != null) key3,
|
||||
];
|
||||
|
||||
const TupleKey.byParts(this.parts);
|
||||
|
||||
TupleKey.fromString(String multiKeyString) : parts = multiKeyString.split('|').toList();
|
||||
|
||||
@override
|
||||
String toString() => parts.join('|');
|
||||
|
||||
@override
|
||||
bool operator ==(other) => parts.toString() == other.toString();
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hashAll(parts);
|
||||
}
|
||||
Reference in New Issue
Block a user