Rename TelegramCore source folder

This commit is contained in:
Peter
2019-10-29 00:13:20 +04:00
parent d1e57a24bb
commit d2e57174a7
341 changed files with 9 additions and 69 deletions

View File

@@ -0,0 +1,27 @@
import Foundation
#if os(macOS)
import PostboxMac
import SwiftSignalKitMac
#else
import Postbox
import SwiftSignalKit
#endif
import SyncCore
func addSynchronizeLocalizationUpdatesOperation(transaction: Transaction) {
let tag: PeerOperationLogTag = OperationLogTags.SynchronizeLocalizationUpdates
let peerId = PeerId(namespace: 0, id: 0)
var topLocalIndex: Int32?
transaction.operationLogEnumerateEntries(peerId: peerId, tag: tag, { entry in
topLocalIndex = entry.tagLocalIndex
return false
})
if let topLocalIndex = topLocalIndex {
let _ = transaction.operationLogRemoveEntry(peerId: peerId, tag: tag, tagLocalIndex: topLocalIndex)
}
transaction.operationLogAddEntry(peerId: peerId, tag: tag, tagLocalIndex: .automatic, tagMergedIndex: .automatic, contents: SynchronizeLocalizationUpdatesOperation())
}