Chat links and other features

This commit is contained in:
Isaac
2024-03-23 00:00:08 +04:00
parent 5e0269e5ec
commit ef12bf9ce6
95 changed files with 32174 additions and 26700 deletions

View File

@@ -57,7 +57,7 @@ func leftNavigationButtonForChatInterfaceState(_ presentationInterfaceState: Cha
if case let .customChatContents(customChatContents) = presentationInterfaceState.subject {
switch customChatContents.kind {
case .quickReplyMessageInput:
case .quickReplyMessageInput, .businessLinkSetup:
if let currentButton = currentButton, currentButton.action == .dismiss {
return currentButton
} else {
@@ -137,6 +137,14 @@ func rightNavigationButtonForChatInterfaceState(context: AccountContext, present
case .greeting, .away:
return nil
}
case .businessLinkSetup:
if let currentButton = currentButton, currentButton.action == .edit {
return currentButton
} else {
let buttonItem = UIBarButtonItem(title: strings.Common_Edit, style: .plain, target: target, action: selector)
buttonItem.accessibilityLabel = strings.Common_Done
return ChatNavigationButton(action: .edit, buttonItem: buttonItem)
}
}
}