Store mailbox cache by AccountId

(cherry picked from commit 7804f19d27d65af855e145de1953df9a553f3ce0)
This commit is contained in:
dab246
2023-04-25 14:35:55 +07:00
committed by Dat Vu
parent 880c41b721
commit 1b7ce6b37a
13 changed files with 95 additions and 28 deletions
@@ -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);
}