Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect GIF message bubble sizing #1300

Merged
merged 1 commit into from
Aug 15, 2016
Merged

Fix incorrect GIF message bubble sizing #1300

merged 1 commit into from
Aug 15, 2016

Conversation

ajstiles
Copy link
Contributor

@ajstiles ajstiles commented Aug 8, 2016

First time contributor checklist

Contributor checklist

  • I'm following the code, UI and style conventions
  • My commits are rebased on the latest master branch
  • My commits are in nice logical chunks
  • My contribution is fully baked and is ready to be merged as is
  • I have tested my contribution on these devices:
    • iPhone 6, iOS 9.3.3
  • I have made the choice whether I want the BitHub reward or not by omitting or adding the word FREEBIE in my commit message

Description

TSAnimatedAdapter is used when rendering GIFs. TSAnimatedAdapter
inherits from JSQMediaItem but does not provide a custom implementation
of the hash method. The default implementation of hash in JSQMediaItem
results in all messages of a given interaction type (incoming,
outgoing) sharing a cached bubble size. For this reason, JSQMediaItem
subclasses are required to implement hash (see
jessesquires/JSQMessagesViewController#631).

This commit fixes #1275 by implementing hash in TSAnimatedAdapter
the same way TSPhotoAdapter does.

TSAnimatedAdapter is used when rendering GIFs. TSAnimatedAdapter
inherits from JSQMediaItem but does not provide a custom implementation
of the hash method. The default implementation of hash in JSQMediaItem
results in all messages of a given interaction type (incoming,
outgoing) sharing a cached bubble size. For this reason, JSQMediaItem
subclasses are required to implement hash (see
jessesquires/JSQMessagesViewController#631).

This commit fixes issue #1275 by implementing hash in TSAnimatedAdapter
the same way TSPhotoAdapter does.
@michaelkirk michaelkirk merged commit 52861a6 into signalapp:master Aug 15, 2016
@michaelkirk
Copy link
Contributor

Thanks @ajstiles!

@michaelkirk michaelkirk modified the milestone: 2.4.2 Aug 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Incoming GIF's are rendered too small in group chats
2 participants