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

Bug in scrollToBottomAnimated #1640

Closed
IceFloe opened this issue Jun 4, 2016 · 2 comments
Closed

Bug in scrollToBottomAnimated #1640

IceFloe opened this issue Jun 4, 2016 · 2 comments
Labels
Milestone

Comments

@IceFloe
Copy link
Contributor

IceFloe commented Jun 4, 2016

Hi @jessesquires, one small bug I have found in the scrollToBottomAnimated function, when we calculate maxHeightForVisibleMessage. We should also minus self.collectionView.contentInset.bottom.

Should be like this one

CGFloat maxHeightForVisibleMessage = CGRectGetHeight(self.collectionView.bounds) - self.collectionView.contentInset.top - self.collectionView.contentInset.bottom - CGRectGetHeight(self.inputToolbar.bounds);

In other way when we have keyboard opened and a big image come to us in chat it will not scroll to UICollectionViewScrollPositionBottom. What do you think, should I create pull request?

Second small bug in the

`- (void)viewWillLayoutSubviews
{
[super viewWillLayoutSubviews];

if (!self.inputToolbar.contentView.textView.isFirstResponder) {
    [self jsq_setToolbarBottomLayoutGuideConstant:self.bottomLayoutGuide.length];
}

}
This code will not work with .hidesBottomBarWhenPushed = true`
Effect will be like jumping toolbar after view did appear. I am not sure for now how to fix this, but I can try.

@jessesquires
Copy link
Owner

Thanks @IceFloe ! 😄

A pull request for the first issue would be great! 👍

The second bug was fixed in v7.3.1

@jessesquires
Copy link
Owner

Be sure to submit the fix to the release_7.3 branch 😊

@jessesquires jessesquires changed the title Two small bugs Bug in scrollToBottomAnimated Jun 5, 2016
@jessesquires jessesquires added this to the 7.3.2 milestone Jun 5, 2016
Slessi pushed a commit to preeo/JSQMessagesViewController that referenced this issue Aug 22, 2016
pcoltau added a commit to TeletronicsDotAe/JSQMessagesViewController that referenced this issue Apr 16, 2017
…iewController

* 'master' of https://github.com/jessesquires/JSQMessagesViewController: (86 commits)
  ImageOptim on assets (jessesquires#1845)
  update changelog and spec for 7.3.4
  Fix issue jessesquires#1583: Don't highlight cell outside message bubble (when long press) (jessesquires#1744)
  update changelog and version for 7.3.3
  Updated `canPerformAction:withSender:` in `JSQMessagesComposerTextView` to call super (jessesquires#1664). Fixes jessesquires#1663.
  Update CHANGELOG and version nums for 7.3.2
  fix KVO crash. close jessesquires#1631
  formatting
  small fix regarding scrollToIndexPath (jessesquires#1642) close jessesquires#1640
  Update CHANGELOG.md
  update CHANGLOG. bump version numbers
  Reverted jessesquires#1588 to fix jessesquires#1602 and fix jessesquires#1604. (jessesquires#1623)
  bump version numbers
  Update CHANGELOG.md
  provide default init values for JSQMessagesCollectionViewLayoutAttributes to prevent assertion. fix jessesquires#1338
  follow up for jessesquires#1247 and jessesquires#1591. obfuscate private APIs. swizzle via +initialize
  copy attributes
  clean up
  fix keyboard hiding bug on iOS 9 (jessesquires#1307). fix jessesquires#1063
  - cleanup from PR jessesquires#1281 - fix menu actions, close jessesquires#1321 - make notification methods public - partially apply changes from PR jessesquires#1563
  ...
pcoltau added a commit to TeletronicsDotAe/JSQMessagesViewController that referenced this issue Apr 16, 2017
…nch3

* origin/master: (66 commits)
  ImageOptim on assets (jessesquires#1845)
  update changelog and spec for 7.3.4
  Fix issue jessesquires#1583: Don't highlight cell outside message bubble (when long press) (jessesquires#1744)
  update changelog and version for 7.3.3
  Updated `canPerformAction:withSender:` in `JSQMessagesComposerTextView` to call super (jessesquires#1664). Fixes jessesquires#1663.
  Update CHANGELOG and version nums for 7.3.2
  fix KVO crash. close jessesquires#1631
  formatting
  small fix regarding scrollToIndexPath (jessesquires#1642) close jessesquires#1640
  Update CHANGELOG.md
  update CHANGLOG. bump version numbers
  Reverted jessesquires#1588 to fix jessesquires#1602 and fix jessesquires#1604. (jessesquires#1623)
  bump version numbers
  Update CHANGELOG.md
  provide default init values for JSQMessagesCollectionViewLayoutAttributes to prevent assertion. fix jessesquires#1338
  follow up for jessesquires#1247 and jessesquires#1591. obfuscate private APIs. swizzle via +initialize
  copy attributes
  clean up
  fix keyboard hiding bug on iOS 9 (jessesquires#1307). fix jessesquires#1063
  - cleanup from PR jessesquires#1281 - fix menu actions, close jessesquires#1321 - make notification methods public - partially apply changes from PR jessesquires#1563
  ...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants