Skip to content
This repository was archived by the owner on Aug 14, 2019. It is now read-only.

Commit 45daada

Browse files
idrouggejessesquires
authored andcommitted
Fix for preloading textview and resizing it (#1865) close #1709
* Fix for behaviour described in issue #1709, where input toolbar and corresponding textView do not keep their old size when the view re-appears while a multi-line message is being entered.
1 parent 5199446 commit 45daada

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

JSQMessagesViewController/Controllers/JSQMessagesViewController.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,9 @@ - (void)viewDidLoad
238238
- (void)viewWillAppear:(BOOL)animated
239239
{
240240
[super viewWillAppear:animated];
241-
self.toolbarHeightConstraint.constant = self.inputToolbar.preferredDefaultHeight;
241+
if (!self.inputToolbar.contentView.textView.hasText) {
242+
self.toolbarHeightConstraint.constant = self.inputToolbar.preferredDefaultHeight;
243+
}
242244
[self.view layoutIfNeeded];
243245
[self.collectionView.collectionViewLayout invalidateLayout];
244246

0 commit comments

Comments
 (0)