mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Temporarily disable account cleanup
This commit is contained in:
@@ -1412,17 +1412,6 @@ public final class Postbox {
|
||||
self.mediaBox = MediaBox(basePath: self.basePath + "/media")
|
||||
self.valueBox = valueBox
|
||||
|
||||
/*self.pipeNotifier = PipeNotifier(basePath: basePath, notify: { [weak self] in
|
||||
//if let strongSelf = self {
|
||||
/*strongSelf.queue.async {
|
||||
if strongSelf.valueBox != nil {
|
||||
let _ = strongSelf.transaction({ _ -> Void in
|
||||
}).start()
|
||||
}
|
||||
}*/
|
||||
//}
|
||||
})*/
|
||||
|
||||
self.metadataTable = MetadataTable(valueBox: self.valueBox, table: MetadataTable.tableSpec(0))
|
||||
|
||||
self.keychainTable = KeychainTable(valueBox: self.valueBox, table: KeychainTable.tableSpec(1))
|
||||
|
||||
@@ -1124,14 +1124,16 @@ public class Account {
|
||||
}
|
||||
self.managedOperationsDisposable.add(managedGreetingStickers(postbox: self.postbox, network: self.network).start())
|
||||
|
||||
let mediaBox = postbox.mediaBox
|
||||
self.storageSettingsDisposable = accountManager.sharedData(keys: [SharedDataKeys.cacheStorageSettings]).start(next: { [weak mediaBox] sharedData in
|
||||
guard let mediaBox = mediaBox else {
|
||||
return
|
||||
}
|
||||
let settings: CacheStorageSettings = sharedData.entries[SharedDataKeys.cacheStorageSettings] as? CacheStorageSettings ?? CacheStorageSettings.defaultSettings
|
||||
mediaBox.setMaxStoreTimes(general: settings.defaultCacheStorageTimeout, shortLived: 60 * 60, gigabytesLimit: settings.defaultCacheStorageLimitGigabytes)
|
||||
})
|
||||
if !supplementary {
|
||||
let mediaBox = postbox.mediaBox
|
||||
self.storageSettingsDisposable = accountManager.sharedData(keys: [SharedDataKeys.cacheStorageSettings]).start(next: { [weak mediaBox] sharedData in
|
||||
guard let mediaBox = mediaBox else {
|
||||
return
|
||||
}
|
||||
let settings: CacheStorageSettings = sharedData.entries[SharedDataKeys.cacheStorageSettings] as? CacheStorageSettings ?? CacheStorageSettings.defaultSettings
|
||||
mediaBox.setMaxStoreTimes(general: settings.defaultCacheStorageTimeout, shortLived: 60 * 60, gigabytesLimit: settings.defaultCacheStorageLimitGigabytes)
|
||||
})
|
||||
}
|
||||
|
||||
let _ = masterNotificationsKey(masterNotificationKeyValue: self.masterNotificationKey, postbox: self.postbox, ignoreDisabled: false).start(next: { key in
|
||||
let encoder = JSONEncoder()
|
||||
|
||||
@@ -373,7 +373,8 @@ public func managedCleanupAccounts(networkArguments: NetworkInitializationArgume
|
||||
}
|
||||
for (id, attributes, disposable) in beginList {
|
||||
Logger.shared.log("managedCleanupAccounts", "cleanup \(id), current is \(String(describing: view.currentRecord?.id))")
|
||||
disposable.set(cleanupAccount(networkArguments: networkArguments, accountManager: accountManager, id: id, encryptionParameters: encryptionParameters, attributes: attributes, rootPath: rootPath, auxiliaryMethods: auxiliaryMethods).start())
|
||||
//TODO:localize
|
||||
//disposable.set(cleanupAccount(networkArguments: networkArguments, accountManager: accountManager, id: id, encryptionParameters: encryptionParameters, attributes: attributes, rootPath: rootPath, auxiliaryMethods: auxiliaryMethods).start())
|
||||
}
|
||||
|
||||
var validPaths = Set<String>()
|
||||
|
||||
Reference in New Issue
Block a user