remove unused code, add comment

This commit is contained in:
Michael Kirk 2018-07-02 23:10:50 -06:00
parent 2b588017f3
commit 83d3f17d44
3 changed files with 5 additions and 3 deletions

View file

@ -72,6 +72,10 @@ NS_ASSUME_NONNULL_BEGIN
- (void)setContentOffset:(CGPoint)contentOffset animated:(BOOL)isAnimated
{
// When creating new lines, contentOffset is animated, but because because
// we are simultaneously resizing the text view, this can cause the
// text in the textview to be "too high" in the text view.
// Solution is to disable animation for setting content offset.
[super setContentOffset:contentOffset animated:false];
}

View file

@ -36,8 +36,6 @@ const CGFloat kMaxTextViewHeight = 98;
@property (nonatomic, readonly) UIButton *sendButton;
@property (nonatomic, readonly) UIButton *voiceMemoButton;
@property (nonatomic) NSValue *lastTextContentSize;
@property (nonatomic) CGFloat toolbarHeight;
@property (nonatomic) CGFloat textViewHeight;
@property (nonatomic, readonly) NSLayoutConstraint *textViewHeightConstraint;

View file

@ -537,7 +537,7 @@ class CaptioningToolbar: UIView, UITextViewDelegate {
textView.addBorder(with: UIColor.lightGray)
textView.font = UIFont.ows_dynamicTypeBody
textView.returnKeyType = .done
textView.textContainerInset = UIEdgeInsets(top: 7, left: 7, bottom: 7, right: )
textView.textContainerInset = UIEdgeInsets(top: 7, left: 7, bottom: 7, right: 7)
textView.scrollIndicatorInsets = UIEdgeInsets(top: 5, left: 0, bottom: 5, right: 3)
let sendTitle = NSLocalizedString("ATTACHMENT_APPROVAL_SEND_BUTTON", comment: "Label for 'send' button in the 'attachment approval' dialog.")