mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
[WIP] Conference
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user