mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Comment updates
This commit is contained in:
@@ -27,6 +27,9 @@ struct ChatNavigationButton: Equatable {
|
||||
|
||||
func leftNavigationButtonForChatInterfaceState(_ presentationInterfaceState: ChatPresentationInterfaceState, subject: ChatControllerSubject?, strings: PresentationStrings, currentButton: ChatNavigationButton?, target: Any?, selector: Selector?) -> ChatNavigationButton? {
|
||||
if let _ = presentationInterfaceState.interfaceState.selectionState {
|
||||
if case .replyThread = presentationInterfaceState.chatLocation {
|
||||
return nil
|
||||
}
|
||||
if let currentButton = currentButton, currentButton.action == .clearHistory {
|
||||
return currentButton
|
||||
} else if let peer = presentationInterfaceState.renderedPeer?.peer {
|
||||
@@ -64,6 +67,14 @@ func leftNavigationButtonForChatInterfaceState(_ presentationInterfaceState: Cha
|
||||
}
|
||||
|
||||
func rightNavigationButtonForChatInterfaceState(_ presentationInterfaceState: ChatPresentationInterfaceState, strings: PresentationStrings, currentButton: ChatNavigationButton?, target: Any?, selector: Selector?, chatInfoNavigationButton: ChatNavigationButton?) -> ChatNavigationButton? {
|
||||
if let _ = presentationInterfaceState.interfaceState.selectionState {
|
||||
if let currentButton = currentButton, currentButton.action == .cancelMessageSelection {
|
||||
return currentButton
|
||||
} else {
|
||||
return ChatNavigationButton(action: .cancelMessageSelection, buttonItem: UIBarButtonItem(title: strings.Common_Cancel, style: .plain, target: target, action: selector))
|
||||
}
|
||||
}
|
||||
|
||||
if case .replyThread = presentationInterfaceState.chatLocation {
|
||||
if case .search = currentButton?.action {
|
||||
return currentButton
|
||||
@@ -84,13 +95,6 @@ func rightNavigationButtonForChatInterfaceState(_ presentationInterfaceState: Ch
|
||||
}
|
||||
}
|
||||
}
|
||||
if let _ = presentationInterfaceState.interfaceState.selectionState {
|
||||
if let currentButton = currentButton, currentButton.action == .cancelMessageSelection {
|
||||
return currentButton
|
||||
} else {
|
||||
return ChatNavigationButton(action: .cancelMessageSelection, buttonItem: UIBarButtonItem(title: strings.Common_Cancel, style: .plain, target: target, action: selector))
|
||||
}
|
||||
}
|
||||
|
||||
if presentationInterfaceState.isScheduledMessages {
|
||||
return chatInfoNavigationButton
|
||||
|
||||
Reference in New Issue
Block a user