Update API

This commit is contained in:
Ali
2021-07-23 18:41:15 +02:00
parent cdc2ce8447
commit e4043b28e4
14 changed files with 102 additions and 91 deletions

View File

@@ -124,13 +124,13 @@ func managedSynchronizeInstalledStickerPacksOperations(postbox: Postbox, network
}
private func hashForStickerPackInfos(_ infos: [StickerPackCollectionInfo]) -> Int32 {
var acc: UInt32 = 0
var acc: UInt64 = 0
for info in infos {
acc = UInt32(bitPattern: Int32(bitPattern: acc &* UInt32(20261)) &+ info.hash)
acc = (acc &* 20261) &+ UInt64(UInt32(bitPattern: info.hash))
}
return Int32(bitPattern: acc & 0x7FFFFFFF)
return Int32(bitPattern: UInt32(clamping: acc & UInt64(0xFFFFFFFF)))
}
private enum SynchronizeInstalledStickerPacksError {