Respond to CR.

This commit is contained in:
Matthew Chen 2019-03-14 12:53:54 -04:00
parent d80f086f31
commit d824c49c07
2 changed files with 5 additions and 8 deletions

View file

@ -127,16 +127,13 @@ class AttachmentApprovalInputAccessoryView: UIView {
attachmentTextToolbar.textView.resignFirstResponder()
}
} else if (isEditingCaptions) {
// While editing captions, the keyboard should always remain visible.
if !attachmentCaptionToolbar.textView.isFirstResponder {
attachmentCaptionToolbar.textView.becomeFirstResponder()
}
} else {
if !attachmentTextToolbar.textView.isFirstResponder {
attachmentTextToolbar.textView.becomeFirstResponder()
}
}
invalidateIntrinsicContentSize()
// NOTE: We don't automatically make attachmentTextToolbar.textView
// first responder;
layoutSubviews()
}

View file

@ -301,8 +301,8 @@ public class AttachmentApprovalViewController: UIPageViewController, UIPageViewC
}
private func updateControlVisibility() {
if !shouldHideControls {
self.becomeFirstResponder()
if !shouldHideControls, !isFirstResponder {
becomeFirstResponder()
}
bottomToolView.shouldHideControls = shouldHideControls
}