typo fixes

This commit is contained in:
Mike Renoir 2022-11-08 12:38:05 +04:00
parent 45e50a68d7
commit 72b83e4cf8
3 changed files with 12 additions and 8 deletions

View File

@ -14,17 +14,17 @@ public enum InternalUpdaterError {
public func requestUpdatesXml(account: Account, source: String) -> Signal<Data, InternalUpdaterError> {
return TelegramEngine(account: account).peers.resolvePeerByName(name: source)
|> castError(InternalUpdaterError.self)
|> mapToSignal { peer -> Signal<Peer?, InternalUpdaterError> in
return .single(peer?._asPeer())
|> map { peer -> Peer? in
return peer?._asPeer()
}
|> mapToSignal { peer in
|> mapToSignal { peer -> Signal<Data, InternalUpdaterError> in
if let peer = peer, let inputPeer = apiInputPeer(peer) {
return account.network.request(Api.functions.messages.getHistory(peer: inputPeer, offsetId: 0, offsetDate: 0, addOffset: 0, limit: 1, maxId: Int32.max, minId: 0, hash: 0))
|> retryRequest
|> castError(InternalUpdaterError.self)
|> mapToSignal { result in
switch result {
case let .channelMessages(_, _, _, _, apiMessages, apiChats, apiUsers):
case let .channelMessages(_, _, _, _, apiMessages, _, apiChats, apiUsers):
if let apiMessage = apiMessages.first, let storeMessage = StoreMessage(apiMessage: apiMessage) {
var peers: [PeerId: Peer] = [:]
@ -89,7 +89,7 @@ public func downloadAppUpdate(account: Account, source: String, messageId: Int32
|> castError(InternalUpdaterError.self)
|> mapToSignal { messages in
switch messages {
case let .channelMessages(_, _, _, _, apiMessages, apiChats, apiUsers):
case let .channelMessages(_, _, _, _, apiMessages, _, apiChats, apiUsers):
var peers: [PeerId: Peer] = [:]
for chat in apiChats {

View File

@ -576,10 +576,12 @@ public final class OngoingGroupCallContext {
self.audioSessionActiveDisposable.set((audioSessionActive
|> deliverOn(queue)).start(next: { [weak self] isActive in
guard let self else {
guard let `self` = self else {
return
}
#if os(iOS)
self.context.setManualAudioSessionIsActive(isActive)
#endif
}))
}

View File

@ -579,7 +579,9 @@ extension OngoingCallThreadLocalContextWebrtc: OngoingCallThreadLocalContextProt
}
func nativeSetIsAudioSessionActive(isActive: Bool) {
#if os(iOS)
self.setManualAudioSessionIsActive(isActive)
#endif
}
}
@ -1482,7 +1484,7 @@ private final class CallSignalingConnectionManager {
let connection = CallSignalingConnectionImpl(queue: queue, host: host, port: port, peerTag: self.peerTag, dataReceived: { data in
dataReceived(data)
}, isClosed: { [weak self] in
guard let self else {
guard let `self` = self else {
return
}
self.handleConnectionFailed(id: id)