Add bot commands menu

This commit is contained in:
Ilya Laktyushin
2021-06-15 19:35:43 +03:00
parent 140d58bdd6
commit 6eb0726390
22 changed files with 4234 additions and 3567 deletions

View File

@@ -2327,7 +2327,6 @@ class ChatControllerNode: ASDisplayNode, UIScrollViewDelegate {
}
if !messages.isEmpty || self.chatPresentationInterfaceState.interfaceState.forwardMessageIds != nil {
if let forwardMessageIds = self.chatPresentationInterfaceState.interfaceState.forwardMessageIds {
for id in forwardMessageIds {
messages.append(.forward(source: id, grouping: .auto, attributes: [], correlationId: nil))
@@ -2453,6 +2452,10 @@ class ChatControllerNode: ASDisplayNode, UIScrollViewDelegate {
if (self.context.sharedContext.currentPresentationData.with({ $0 })).reduceMotion {
return false
}
if self.chatPresentationInterfaceState.showCommands {
return false
}
switch self.historyNode.visibleContentOffset() {
case let .known(value) where value < 20.0: