From edc71e2f91f2a0cfb51a48c4ec24af2fa437c314 Mon Sep 17 00:00:00 2001 From: Clay Ellis Date: Wed, 21 Feb 2018 22:32:27 -0700 Subject: [PATCH] Rename shouldAutoUpdateSendButtonEnabledStateOnTextDidChange > shouldManageSendButtonEnabledState and update documentation comment. --- Sources/Views/MessageInputBar.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/Views/MessageInputBar.swift b/Sources/Views/MessageInputBar.swift index 2b467655..a75f3480 100644 --- a/Sources/Views/MessageInputBar.swift +++ b/Sources/Views/MessageInputBar.swift @@ -137,8 +137,8 @@ open class MessageInputBar: UIView { } }() - /// A boolean that determines if the sendButton's `isEnabled` state should be auto updated on text changes. - open var shouldAutoUpdateSendButtonEnabledStateOnTextDidChange = true + /// A boolean that determines whether the sendButton's `isEnabled` state should be managed automatically. + open var shouldManageSendButtonEnabledState = true /** The anchor constants that inset the contentView @@ -673,7 +673,7 @@ open class MessageInputBar: UIView { open func textViewDidChange() { let trimmedText = inputTextView.text.trimmingCharacters(in: .whitespacesAndNewlines) - if shouldAutoUpdateSendButtonEnabledStateOnTextDidChange { + if shouldManageSendButtonEnabledState { sendButton.isEnabled = !trimmedText.isEmpty || inputTextView.images.count > 0 } inputTextView.placeholderLabel.isHidden = !inputTextView.text.isEmpty