Skip to content

Fix messageInputBar sendButton not disabled in some situations#475

Merged
zhongwuzw merged 3 commits intodevelopmentfrom
bugfix/messageInputBar
Jan 25, 2018
Merged

Fix messageInputBar sendButton not disabled in some situations#475
zhongwuzw merged 3 commits intodevelopmentfrom
bugfix/messageInputBar

Conversation

@zhongwuzw
Copy link
Member

Fixed #473

/// 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

Comments