Voice Chats Fixes

This commit is contained in:
Ilya Laktyushin
2021-03-15 22:28:28 +04:00
parent 080a8b780a
commit 16ab35c357
7 changed files with 3834 additions and 3785 deletions

View File

@@ -896,7 +896,15 @@ open class TelegramBaseController: ViewController, KeyShortcutResponder {
}
var items: [ActionSheetItem] = []
items.append(VoiceChatAccountHeaderActionSheetItem(title: presentationData.strings.VoiceChat_SelectAccount, text: presentationData.strings.VoiceChat_DisplayAsInfo))
var isGroup = false
for peer in peers {
if let peer = peer.peer as? TelegramChannel, case .group = peer.info {
isGroup = true
break
}
}
items.append(VoiceChatAccountHeaderActionSheetItem(title: presentationData.strings.VoiceChat_SelectAccount, text: isGroup ? presentationData.strings.VoiceChat_DisplayAsInfoGroup : presentationData.strings.VoiceChat_DisplayAsInfo))
for peer in peers {
var subtitle: String?
if peer.peer.id.namespace == Namespaces.Peer.CloudUser {