mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Disable AI button in secret chats
This commit is contained in:
parent
43e41b20d9
commit
1a728382c4
4 changed files with 4 additions and 4 deletions
|
|
@ -2226,7 +2226,7 @@ final class AttachmentPanel: ASDisplayNode, ASScrollViewDelegate, ASGestureRecog
|
|||
}
|
||||
}, makeEntityInputView: self.makeEntityInputView)
|
||||
if let data = self.context.currentAppConfiguration.with({ $0 }).data, let value = data["ios_disable_ai_chat"] as? Double, value == 1.0 {
|
||||
} else {
|
||||
} else if let peerId = self.presentationInterfaceState.chatLocation.peerId, peerId.namespace != Namespaces.Peer.SecretChat {
|
||||
textInputPanelNode.isAIEnabled = true
|
||||
}
|
||||
textInputPanelNode.interfaceInteraction = self.interfaceInteraction
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ public class LegacyMessageInputPanelNode: ASDisplayNode, TGCaptionPanelView {
|
|||
super.init()
|
||||
|
||||
if let data = context.currentAppConfiguration.with({ $0 }).data, let value = data["ios_disable_ai_attach"] as? Double, value == 1.0 {
|
||||
} else {
|
||||
} else if let peerId = chatLocation.peerId, peerId.namespace != Namespaces.Peer.SecretChat {
|
||||
self.isAIEnabled = true
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -888,7 +888,7 @@ class ChatControllerNode: ASDisplayNode, ASScrollViewDelegate {
|
|||
self?.interfaceInteraction?.presentController(controller, nil)
|
||||
})
|
||||
if let data = self.context.currentAppConfiguration.with({ $0 }).data, let value = data["ios_disable_ai_chat"] as? Double, value == 1.0 {
|
||||
} else {
|
||||
} else if let peerId = self.presentationInterfaceState.chatLocation.peerId, peerId.namespace != Namespaces.Peer.SecretChat {
|
||||
self.textInputPanelNode?.isAIEnabled = true
|
||||
}
|
||||
self.textInputPanelNode?.textInputAccessoryPanel = textInputAccessoryPanel
|
||||
|
|
|
|||
|
|
@ -465,7 +465,7 @@ func inputPanelForChatPresentationIntefaceState(_ chatPresentationInterfaceState
|
|||
interfaceInteraction?.presentController(controller, nil)
|
||||
})
|
||||
if let data = context.currentAppConfiguration.with({ $0 }).data, let value = data["ios_disable_ai_chat"] as? Double, value == 1.0 {
|
||||
} else {
|
||||
} else if let peerId = chatPresentationInterfaceState.chatLocation.peerId, peerId.namespace != Namespaces.Peer.SecretChat {
|
||||
panel.isAIEnabled = true
|
||||
}
|
||||
panel.textInputAccessoryPanel = textInputAccessoryPanel
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue