Various Improvements

This commit is contained in:
Ilya Laktyushin
2021-08-25 02:49:02 +03:00
parent a43d164359
commit bdc30b1888
61 changed files with 1599 additions and 294 deletions

View File

@@ -28,6 +28,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 .forwardedMessages = presentationInterfaceState.subject {
return nil
}
if let _ = presentationInterfaceState.reportReason {
return ChatNavigationButton(action: .spacer, buttonItem: UIBarButtonItem(title: " ", style: .plain, target: nil, action: nil))
}
@@ -74,6 +77,9 @@ 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 case .forwardedMessages = presentationInterfaceState.subject {
return nil
}
if let currentButton = currentButton, currentButton.action == .cancelMessageSelection {
return currentButton
} else {
@@ -90,6 +96,10 @@ func rightNavigationButtonForChatInterfaceState(_ presentationInterfaceState: Ch
}
}
if case .forwardedMessages = presentationInterfaceState.subject {
return nil
}
if case .pinnedMessages = presentationInterfaceState.subject {
return nil
}