Various Fixes

This commit is contained in:
Ilya Laktyushin
2021-03-22 15:02:13 +05:00
parent b6d84038f1
commit ad8e481d5f
16 changed files with 102 additions and 54 deletions

View File

@@ -1265,8 +1265,8 @@ public final class VoiceChatController: ViewController {
openTitle = strongSelf.presentationData.strings.VoiceChat_OpenChannel
openIcon = UIImage(bundleImageName: "Chat/Context Menu/Channels")
} else {
openTitle = strongSelf.presentationData.strings.VoiceChat_OpenChat
openIcon = UIImage(bundleImageName: "Chat/Context Menu/Message")
openTitle = strongSelf.presentationData.strings.Conversation_ContextMenuOpenProfile
openIcon = UIImage(bundleImageName: "Chat/Context Menu/Info")
}
items.append(.action(ContextMenuActionItem(text: openTitle, icon: { theme in
return generateTintedImage(image: openIcon, color: theme.actionSheet.primaryTextColor)
@@ -1277,7 +1277,7 @@ public final class VoiceChatController: ViewController {
let context = strongSelf.context
strongSelf.controller?.dismiss(completion: {
Queue.mainQueue().justDispatch {
Queue.mainQueue().after(0.3) {
if peer.id.namespace == Namespaces.Peer.CloudUser {
let _ = (strongSelf.context.account.postbox.loadedPeerWithId(peer.id)
|> take(1)
@@ -1299,7 +1299,7 @@ public final class VoiceChatController: ViewController {
}
})
f(.dismissWithoutContent)
f(.default)
})))
if let callState = strongSelf.callState, (callState.canManageCall && !callState.adminIds.contains(peer.id)) {
@@ -1959,7 +1959,10 @@ public final class VoiceChatController: ViewController {
var isGroup = false
for peer in peers {
if let peer = peer.peer as? TelegramChannel, case .group = peer.info {
if peer.peer is TelegramGroup {
isGroup = true
break
} else if let peer = peer.peer as? TelegramChannel, case .group = peer.info {
isGroup = true
break
}