Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios

This commit is contained in:
Ilya Laktyushin 2021-11-26 14:45:45 +04:00
commit 1946dffa2d
2 changed files with 14 additions and 1 deletions

View File

@ -103,6 +103,19 @@ public func sendAuthorizationCode(accountManager: AccountManager<TelegramAccount
|> map { sentCode in
return (.sentCode(sentCode), updatedAccount)
}
|> `catch` { error -> Signal<(SendCodeResult, UnauthorizedAccount), MTRpcError> in
if error.errorDescription == "SESSION_PASSWORD_NEEDED" {
return account.network.request(Api.functions.account.getPassword(), automaticFloodWait: false)
|> mapToSignal { result -> Signal<(SendCodeResult, UnauthorizedAccount), MTRpcError> in
switch result {
case let .password(_, _, _, _, hint, _, _, _, _, _):
return .single((.password(hint: hint), account))
}
}
} else {
return .fail(error)
}
}
}
case _:
return .fail(error)

View File

@ -942,7 +942,7 @@ final class ChatMessageInteractiveFileNode: ASDisplayNode {
statusNode.backgroundNodeColor = backgroundNodeColor
}
if state != .none && isVoice && self.playbackAudioLevelNode == nil {
if case .pause = state, isVoice, self.playbackAudioLevelNode == nil {
let blobFrame = progressFrame.insetBy(dx: -12.0, dy: -12.0)
let playbackAudioLevelNode = VoiceBlobNode(
maxLevel: 0.3,