-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Conversation
@@ -703,6 +703,5 @@ open class MessageInputBar: UIView { | |||
/// Invalidates each of the inputManagers | |||
open func didSelectSendButton() { | |||
delegate?.messageInputBar(self, didPressSendButtonWith: inputTextView.text) | |||
textViewDidChange() |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
Looks fine Sent with GitHawk |
There was a problem hiding this 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?
Fixed #473