mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
A coarse approximation of storage management UI
This commit is contained in:
@@ -230,6 +230,19 @@ public final class StorageBox {
|
||||
})
|
||||
}
|
||||
|
||||
func reset() {
|
||||
self.valueBox.begin()
|
||||
|
||||
self.valueBox.removeAllFromTable(self.hashIdToInfoTable)
|
||||
self.valueBox.removeAllFromTable(self.idToReferenceTable)
|
||||
self.valueBox.removeAllFromTable(self.peerIdToIdTable)
|
||||
self.valueBox.removeAllFromTable(self.peerContentTypeStatsTable)
|
||||
self.valueBox.removeAllFromTable(self.contentTypeStatsTable)
|
||||
self.valueBox.removeAllFromTable(self.metadataTable)
|
||||
|
||||
self.valueBox.commit()
|
||||
}
|
||||
|
||||
private func internalAddSize(contentType: UInt8, delta: Int64) {
|
||||
let key = ValueBoxKey(length: 1)
|
||||
key.setUInt8(0, value: contentType)
|
||||
@@ -893,4 +906,10 @@ public final class StorageBox {
|
||||
completion(ids)
|
||||
}
|
||||
}
|
||||
|
||||
public func reset() {
|
||||
self.impl.with { impl in
|
||||
impl.reset()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user