[WIP] Video chats v2

This commit is contained in:
Isaac
2024-08-30 22:26:59 +08:00
parent 1567e6719c
commit 67ded11399
21 changed files with 1480 additions and 166 deletions

View File

@@ -906,13 +906,14 @@ public final class SharedAccountContextImpl: SharedAccountContext {
strongSelf.groupCallController = groupCallController
navigationController.pushViewController(groupCallController)
} else {
strongSelf.hasGroupCallOnScreenPromise.set(true)
let _ = (makeVoiceChatControllerInitialData(sharedContext: strongSelf, accountContext: call.accountContext, call: call)
|> deliverOnMainQueue).start(next: { [weak strongSelf, weak navigationController] initialData in
guard let strongSelf, let navigationController else {
return
}
strongSelf.hasGroupCallOnScreenPromise.set(true)
let groupCallController = makeVoiceChatController(sharedContext: strongSelf, accountContext: call.accountContext, call: call, initialData: initialData)
groupCallController.onViewDidAppear = { [weak strongSelf] in
if let strongSelf {