Conference improvements

This commit is contained in:
Isaac 2025-04-18 17:56:24 +04:00
parent 0d4b8ee2c0
commit 4bbea1f0d0
25 changed files with 506 additions and 219 deletions

View file

@ -210,7 +210,7 @@ public final class CallListController: TelegramBaseController {
}
private func createGroupCall(peerIds: [EnginePeer.Id], isVideo: Bool, completion: (() -> Void)? = nil) {
self.view.endEditing(true)
self.view.window?.endEditing(true)
guard !self.presentAccountFrozenInfoIfNeeded() else {
return
@ -264,7 +264,7 @@ public final class CallListController: TelegramBaseController {
guard let self else {
return
}
self.context.sharedContext.callManager?.joinConferenceCall(
let _ = self.context.sharedContext.callManager?.joinConferenceCall(
accountContext: self.context,
initialCall: EngineGroupCallDescription(
id: call.callInfo.id,
@ -276,7 +276,8 @@ public final class CallListController: TelegramBaseController {
),
reference: .id(id: call.callInfo.id, accessHash: call.callInfo.accessHash),
beginWithVideo: isVideo,
invitePeerIds: peerIds
invitePeerIds: peerIds,
endCurrentIfAny: true
)
completion?()
}
@ -712,20 +713,7 @@ public final class CallListController: TelegramBaseController {
guard let self else {
return
}
self.context.sharedContext.callManager?.joinConferenceCall(
accountContext: self.context,
initialCall: EngineGroupCallDescription(
id: resolvedCallLink.id,
accessHash: resolvedCallLink.accessHash,
title: nil,
scheduleTimestamp: nil,
subscribedToScheduled: false,
isStream: false
),
reference: .message(id: message.id),
beginWithVideo: conferenceCall.flags.contains(.isVideo),
invitePeerIds: []
)
self.context.joinConferenceCall(call: resolvedCallLink, isVideo: conferenceCall.flags.contains(.isVideo))
}, error: { [weak self] error in
guard let self else {
return