mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Update API
This commit is contained in:
@@ -5,16 +5,12 @@ import SwiftSignalKit
|
||||
|
||||
|
||||
private func hashForIdsReverse(_ ids: [Int64]) -> Int32 {
|
||||
var acc: UInt32 = 0
|
||||
var acc: UInt64 = 0
|
||||
|
||||
for id in ids {
|
||||
let low = UInt32(UInt64(bitPattern: id) & (0xffffffff as UInt64))
|
||||
let high = UInt32((UInt64(bitPattern: id) >> 32) & (0xffffffff as UInt64))
|
||||
|
||||
acc = (acc &* 20261) &+ high
|
||||
acc = (acc &* 20261) &+ low
|
||||
acc = (acc &* 20261) &+ UInt64(bitPattern: id)
|
||||
}
|
||||
return Int32(bitPattern: acc & UInt32(0x7FFFFFFF))
|
||||
return Int32(bitPattern: UInt32(clamping: acc & UInt64(0x7FFFFFFF)))
|
||||
}
|
||||
|
||||
func manageStickerPacks(network: Network, postbox: Postbox) -> Signal<Void, NoError> {
|
||||
|
||||
Reference in New Issue
Block a user