Fix voice chat peer selection menu in channels

This commit is contained in:
Ilya Laktyushin
2021-03-04 21:15:46 +04:00
parent f03c75cd14
commit 3fd78e7c5d

View File

@@ -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())
}
})
})))
}
}