mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix flags
This commit is contained in:
parent
39f55be8d0
commit
3cd2e3763d
@ -6,9 +6,9 @@ import MtProtoKit
|
||||
|
||||
func _internal_translate(network: Network, text: String, fromLang: String?, toLang: String) -> Signal<String?, NoError> {
|
||||
var flags: Int32 = 0
|
||||
flags |= 1
|
||||
flags |= (1 << 1)
|
||||
if let _ = fromLang {
|
||||
flags |= 2
|
||||
flags |= (1 << 2)
|
||||
}
|
||||
|
||||
return network.request(Api.functions.messages.translateText(flags: flags, peer: nil, msgId: nil, text: text, fromLang: fromLang, toLang: toLang))
|
||||
|
Loading…
x
Reference in New Issue
Block a user