This repository was archived by the owner on Aug 14, 2019. It is now read-only.
File tree Expand file tree Collapse file tree
JSQMessagesViewController/Controllers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -465,10 +465,10 @@ - (void)scrollToIndexPath:(NSIndexPath *)indexPath animated:(BOOL)animated
465465 // if last message is too long, use scroll position bottom for better appearance, else use top
466466 // possibly a UIKit bug, see #480 on GitHub
467467 CGSize cellSize = [self .collectionView.collectionViewLayout sizeForItemAtIndexPath: indexPath];
468- CGFloat maxHeightForVisibleMessage = CGRectGetHeight (self.collectionView .bounds ) -
469- self.collectionView .contentInset .top -
470- self.collectionView .contentInset .bottom -
471- CGRectGetHeight (self.inputToolbar .bounds );
468+ CGFloat maxHeightForVisibleMessage = CGRectGetHeight (self.collectionView .bounds )
469+ - self.collectionView .contentInset .top
470+ - self.collectionView .contentInset .bottom
471+ - CGRectGetHeight (self.inputToolbar .bounds );
472472 UICollectionViewScrollPosition scrollPosition = (cellSize.height > maxHeightForVisibleMessage) ? UICollectionViewScrollPositionBottom : UICollectionViewScrollPositionTop;
473473
474474 [self .collectionView scrollToItemAtIndexPath: indexPath
You can’t perform that action at this time.
0 commit comments