Update notification service

This commit is contained in:
Ali
2021-09-13 20:40:09 +04:00
parent e4d277daf9
commit 0553a14eb3
50 changed files with 600 additions and 796 deletions

View File

@@ -10,10 +10,10 @@ final class ContactTable: Table {
private var peerIdsBeforeModification: Set<PeerId>?
private var peerIds: Set<PeerId>?
init(valueBox: ValueBox, table: ValueBoxTable, peerNameIndexTable: PeerNameIndexTable) {
init(valueBox: ValueBox, table: ValueBoxTable, useCaches: Bool, peerNameIndexTable: PeerNameIndexTable) {
self.peerNameIndexTable = peerNameIndexTable
super.init(valueBox: valueBox, table: table)
super.init(valueBox: valueBox, table: table, useCaches: useCaches)
}
private func key(_ id: PeerId, sharedKey: ValueBoxKey = ValueBoxKey(length: 8)) -> ValueBoxKey {
@@ -98,5 +98,9 @@ final class ContactTable: Table {
self.peerIdsBeforeModification = nil
}
if !self.useCaches {
self.peerIds = nil
}
}
}