Fix an extraneous animation when typing a non-mention after @

This commit is contained in:
Nora Trapp 2020-08-04 17:25:32 -07:00
parent 683a8849fe
commit 6eaee97c53

View File

@ -248,7 +248,13 @@ open class MentionTextView: OWSTextView {
let animationTopConstraint = pickerView.autoPinEdge(.top, to: .top, of: pickerReferenceView)
didUpdateMentionText(currentlyTypingMentionText ?? "")
guard let currentlyTypingMentionText = currentlyTypingMentionText,
pickerView.mentionTextChanged(currentlyTypingMentionText) else {
pickerView.removeFromSuperview()
self.pickerView = nil
state = .notTypingMention
return
}
let style = mentionDelegate.textViewMentionStyle(self)
if style == .composingAttachment {