Preserve old behavior with call to -shouldFocusOnItem function

This commit is contained in:
Igor Kashkuta 2016-05-05 19:08:04 +01:00
parent 4dcf4a4f4b
commit 31a441aebc
1 changed files with 3 additions and 3 deletions

View File

@ -168,13 +168,13 @@ public class ChatInputBar: ReusableXibView {
// MARK: - ChatInputItemViewDelegate
extension ChatInputBar: ChatInputItemViewDelegate {
func inputItemViewTapped(view: ChatInputItemView) {
let shouldFocus = self.delegate?.inputBar(self, shouldFocusOnItem: view.inputItem) ?? true
guard shouldFocus else { return }
self.focusOnInputItem(view.inputItem)
}
public func focusOnInputItem(inputItem: ChatInputItemProtocol) {
let shouldFocus = self.delegate?.inputBar(self, shouldFocusOnItem: inputItem) ?? true
guard shouldFocus else { return }
self.presenter?.onDidReceiveFocusOnItem(inputItem)
self.delegate?.inputBar(self, didReceiveFocusOnItem: inputItem)
}