mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios
This commit is contained in:
@@ -1111,13 +1111,13 @@ public final class AccountViewTracker {
|
||||
let combinedDisposable = MetaDisposable()
|
||||
self.queue.async {
|
||||
var addHole = false
|
||||
if let context = self.channelPollingContexts[peerId] {
|
||||
/*if let context = self.channelPollingContexts[peerId] {
|
||||
if context.subscribers.isEmpty {
|
||||
addHole = true
|
||||
}
|
||||
} else {
|
||||
addHole = true
|
||||
}
|
||||
}*/
|
||||
if addHole {
|
||||
let _ = self.account?.postbox.transaction({ transaction -> Void in
|
||||
if transaction.getPeerChatListIndex(peerId) == nil {
|
||||
|
||||
@@ -218,7 +218,7 @@ private func parseConnectionSet(primary: Api.PhoneConnection, alternative: [Api.
|
||||
private final class CallSessionContext {
|
||||
let peerId: PeerId
|
||||
let isOutgoing: Bool
|
||||
let type: CallSession.CallType
|
||||
var type: CallSession.CallType
|
||||
var state: CallSessionInternalState
|
||||
let subscribers = Bag<(CallSession) -> Void>()
|
||||
let signalingSubscribers = Bag<(Data) -> Void>()
|
||||
@@ -576,6 +576,12 @@ private final class CallSessionManagerContext {
|
||||
}
|
||||
}
|
||||
|
||||
func updateCallType(internalId: CallSessionInternalId, type: CallSession.CallType) {
|
||||
if let context = self.contexts[internalId] {
|
||||
context.type = type
|
||||
}
|
||||
}
|
||||
|
||||
func updateSession(_ call: Api.PhoneCall, completion: @escaping ((CallSessionRingingState, CallSession)?) -> Void) {
|
||||
var resultRingingState: (CallSessionRingingState, CallSession)?
|
||||
|
||||
@@ -932,6 +938,12 @@ public final class CallSessionManager {
|
||||
}
|
||||
}
|
||||
|
||||
public func updateCallType(internalId: CallSessionInternalId, type: CallSession.CallType) {
|
||||
self.withContext { context in
|
||||
context.updateCallType(internalId: internalId, type: type)
|
||||
}
|
||||
}
|
||||
|
||||
public func updateVersions(versions: [String]) {
|
||||
self.withContext { context in
|
||||
context.updateVersions(versions: versions)
|
||||
|
||||
Reference in New Issue
Block a user