mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Rename TelegramCore source folder
This commit is contained in:
@@ -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())
|
||||
}
|
||||
Reference in New Issue
Block a user