Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix messageInputBar sendButton not disabled in some situations #475

Merged
merged 3 commits into from
Jan 25, 2018

Conversation

zhongwuzw
Copy link
Member

Fixed #473

@@ -703,6 +703,5 @@ open class MessageInputBar: UIView {
/// Invalidates each of the inputManagers
open func didSelectSendButton() {
delegate?.messageInputBar(self, didPressSendButtonWith: inputTextView.text)
textViewDidChange()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

// MARK: - Notification

private func postTextViewDidChangeNotification() {
NotificationCenter.default.post(name: .UITextViewTextDidChange, object: self)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think we need to post a notification here? What about keeping the behavior consistent with UIKit and just disabling the button in the didSet? I'm not saying this is the right approach. I want your opinion. cc @nathantannar4 please check this when you get a chance

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Emm, I think it needs. because besides adjust enabled of sendButton, we need also handle placeholderLabel,messageInputBar's size, and so on.

@nathantannar4
Copy link
Member

Looks fine

Sent with GitHawk

@SD10 SD10 removed the API breaking label Jan 24, 2018
Copy link
Member

@SD10 SD10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zhongwuzw Care to add a CHANGELOG entry for this under bugfix?

@SD10 SD10 removed the under review label Jan 24, 2018
@zhongwuzw zhongwuzw merged commit 6ca38b5 into development Jan 25, 2018
@zhongwuzw zhongwuzw deleted the bugfix/messageInputBar branch January 25, 2018 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants