mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 03:20:48 +00:00
Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios
This commit is contained in:
commit
0eb6522b62
@ -669,7 +669,7 @@ public final class StorageBox {
|
||||
let queue = self.queue
|
||||
return ActionDisposable { [weak self] in
|
||||
queue.async {
|
||||
guard let self else {
|
||||
guard let `self` = self else {
|
||||
return
|
||||
}
|
||||
self.totalSizeSubscribers.remove(index)
|
||||
|
@ -52,6 +52,19 @@ private func makeExclusiveKeychain(id: AccountRecordId, postbox: Postbox) -> Key
|
||||
})
|
||||
}
|
||||
|
||||
func _internal_test(_ network: Network) -> Signal<Bool, String> {
|
||||
return network.request(Api.functions.help.test()) |> map { result in
|
||||
switch result {
|
||||
case .boolFalse:
|
||||
return false
|
||||
case .boolTrue:
|
||||
return true
|
||||
}
|
||||
} |> mapError { error in
|
||||
return error.description
|
||||
}
|
||||
}
|
||||
|
||||
public class UnauthorizedAccount {
|
||||
public let networkArguments: NetworkInitializationArguments
|
||||
public let id: AccountRecordId
|
||||
|
@ -23,6 +23,10 @@ public extension TelegramEngineUnauthorized {
|
||||
public func twoStepAuthData() -> Signal<TwoStepAuthData, MTRpcError> {
|
||||
return _internal_twoStepAuthData(self.account.network)
|
||||
}
|
||||
|
||||
public func test() -> Signal<Bool, String> {
|
||||
return _internal_test(self.account.network)
|
||||
}
|
||||
|
||||
public func updateTwoStepVerificationPassword(currentPassword: String?, updatedPassword: UpdatedTwoStepVerificationPassword) -> Signal<UpdateTwoStepVerificationPasswordResult, UpdateTwoStepVerificationPasswordError> {
|
||||
return _internal_updateTwoStepVerificationPassword(network: self.account.network, currentPassword: currentPassword, updatedPassword: updatedPassword)
|
||||
|
Loading…
x
Reference in New Issue
Block a user