From 3fd78e7c5dffd35b53a29dcc295d518cf7ecc474 Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Thu, 4 Mar 2021 21:15:46 +0400 Subject: [PATCH] Fix voice chat peer selection menu in channels --- .../TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift b/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift index 365e274b49..b91de561f9 100644 --- a/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift +++ b/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift @@ -3484,10 +3484,12 @@ private final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewD if channel.flags.contains(.isCreator) || channel.hasPermission(.manageCalls) { items.append(.action(ContextMenuActionItem(text: presentationData.strings.ChannelInfo_CreateVoiceChat, icon: { theme in generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/VoiceChat"), color: theme.contextMenu.primaryColor) - }, action: { [weak self] _, f in - f(.dismissWithoutContent) - - self?.requestCall(isVideo: false) + }, action: { [weak self] c, f in + self?.openVoiceChatDisplayAsPeerSelection(contextController: c, result: f, backAction: { c in + if let mainItemsImpl = mainItemsImpl { + c.setItems(mainItemsImpl()) + } + }) }))) } }