Various Improvements

This commit is contained in:
Ilya Laktyushin
2022-04-23 05:28:29 +04:00
parent e3dc5cbe8a
commit 71bde57b6a
90 changed files with 1757 additions and 297 deletions

View File

@@ -153,9 +153,21 @@ func rightNavigationButtonForChatInterfaceState(_ presentationInterfaceState: Ch
if case .scheduledMessages = presentationInterfaceState.subject {
return chatInfoNavigationButton
} else {
let buttonItem = UIBarButtonItem(image: PresentationResourcesRootController.navigationCompactSearchIcon(presentationInterfaceState.theme), style: .plain, target: target, action: selector)
buttonItem.accessibilityLabel = strings.Conversation_Search
return ChatNavigationButton(action: .search, buttonItem: buttonItem)
if presentationInterfaceState.hasPlentyOfMessages {
if case .search = currentButton?.action {
return currentButton
} else {
let buttonItem = UIBarButtonItem(image: PresentationResourcesRootController.navigationCompactSearchIcon(presentationInterfaceState.theme), style: .plain, target: target, action: selector)
buttonItem.accessibilityLabel = strings.Conversation_Search
return ChatNavigationButton(action: .search, buttonItem: buttonItem)
}
} else {
if case .spacer = currentButton?.action {
return currentButton
} else {
return ChatNavigationButton(action: .spacer, buttonItem: UIBarButtonItem(title: "", style: .plain, target: target, action: selector))
}
}
}
}
}