[WIP] Conference

This commit is contained in:
Isaac
2025-03-19 18:55:24 +01:00
parent 40b19cfef2
commit 17dd059f13
33 changed files with 2034 additions and 283 deletions

View File

@@ -13,6 +13,8 @@ import AppBundle
import LocalizedPeerData
import ContextUI
import TelegramBaseController
import InviteLinksUI
import UndoUI
public enum CallListControllerMode {
case tab
@@ -201,7 +203,28 @@ public final class CallListController: TelegramBaseController {
if self.isNodeLoaded {
self.controllerNode.updateThemeAndStrings(presentationData: self.presentationData)
}
}
private func createGroupCall() {
let controller = InviteLinkInviteController(context: self.context, updatedPresentationData: nil, mode: .groupCall(link: "https://t.me/call/+abbfbffll123", isRecentlyCreated: true), parentNavigationController: self.navigationController as? NavigationController, completed: { [weak self] result in
guard let self else {
return
}
if let result {
switch result {
case .linkCopied:
//TODO:localize
let presentationData = self.context.sharedContext.currentPresentationData.with { $0 }
self.present(UndoOverlayController(presentationData: presentationData, content: .universal(animation: "anim_linkcopied", scale: 0.08, colors: ["info1.info1.stroke": UIColor.clear, "info2.info2.Fill": UIColor.clear], title: nil, text: "Call link copied.", customUndoText: "View Call", timeout: nil), elevatedLayout: false, animateInAsReplacement: false, action: { action in
if case .undo = action {
//TODO:release
}
return false
}), in: .window(.root))
}
}
})
self.present(controller, in: .window(.root), with: nil)
}
override public func loadDisplayNode() {
@@ -275,6 +298,10 @@ public final class CallListController: TelegramBaseController {
}
}
}
}, createGroupCall: { [weak self] in
if let strongSelf = self {
strongSelf.createGroupCall()
}
})
if case .navigation = self.mode {