From 31a441aebc93e09436283d0d719ec5dcc8adb3bd Mon Sep 17 00:00:00 2001 From: Igor Kashkuta Date: Thu, 5 May 2016 19:08:04 +0100 Subject: [PATCH] Preserve old behavior with call to -shouldFocusOnItem function --- ChattoAdditions/Source/Input/ChatInputBar.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ChattoAdditions/Source/Input/ChatInputBar.swift b/ChattoAdditions/Source/Input/ChatInputBar.swift index 47d93e0..41a64e4 100644 --- a/ChattoAdditions/Source/Input/ChatInputBar.swift +++ b/ChattoAdditions/Source/Input/ChatInputBar.swift @@ -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) }