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

Launching fullscreen media view should require tapping directly on media bubble #1257

Closed
michaelkirk opened this issue Jul 14, 2016 · 8 comments
Milestone

Comments

@michaelkirk
Copy link
Contributor

Steps to reproduce

  • receive attachment
  • tap on white space horizontally adjacent to attachment

Actual result: Fullscreen media view opens
Expected result: Fullscreen media view should only open if you click on the media bubble.

@gluxon
Copy link
Contributor

gluxon commented Jul 18, 2016

This appears to be the line causing the issue.

4d320d6#diff-cdc353260e006d747b55ce6d90702e1dR1041

I'd like to do a pull request, but I would be concerned that deleting the line breaks something else. What's the reason didTapMessageBubbleAtIndexPath is being called by didTapCellAtIndexPath?

@michaelkirk
Copy link
Contributor Author

I believe it's there to support tapping on info/error messages.

e.g. The "key changed" dialog.
On Sun, Jul 17, 2016 at 6:50 PM Brandon Cheng [email protected]
wrote:

This appears to be the line causing the issue.

4d320d6#diff-cdc353260e006d747b55ce6d90702e1dR1041
4d320d6#diff-cdc353260e006d747b55ce6d90702e1dR1041

I'd like to do a pull request, but I would be concerned that deleting the
line breaks something else. What's the reason
didTapMessageBubbleAtIndexPath is being called by didTapCellAtIndexPath?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#1257 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AANP4T580ijtdYxkkMT0fUJKa1R6TX6iks5qWtv9gaJpZM4JMAgw
.

@gluxon
Copy link
Contributor

gluxon commented Jul 18, 2016

Ah. I assumed the comment was referring to internal debugging info/error messages. Thanks for the quick response.

@big-r81
Copy link
Contributor

big-r81 commented Jul 18, 2016

@michaelkirk
Hi,
on my device (iPhone 6, iOS 9.3.2, Signal 2.3.5) there is no such a problem.

it seems that this was introduced after Signal 2.3.5 ...

@michaelkirk michaelkirk added this to the 2.3.6 milestone Jul 18, 2016
@michaelkirk
Copy link
Contributor Author

it seems that this was introduced after Signal 2.3.5 ...

That's likely, a lot of code moved around in the recently merged #1255

@gluxon
Copy link
Contributor

gluxon commented Jul 18, 2016

Yeah, the line I linked to was introduced a few days ago. So the root of the issue is that Signal's subclassed JSQMessageCollectionViewCell has no messageBubbleContainerView property for info and error messages. JSQMessages relies heavily on that for bubble tap math. The workaround is to just add a check in the didTapCellAtIndexPath to only call didTapMessageBubbleAtIndexPath for those messages.

I'm going to try getting OWSDisplayedMessageCollectionViewCell properly subclass. If that introduces too many errors, I'll use the workaround.

@michaelkirk
Copy link
Contributor Author

michaelkirk commented Jul 18, 2016

Thanks for look @gluxon. As this is a new regression, it will have to be fixed soon before the next release can go out. I'm conceptually in favor of being able to use the default bubble sizing, if it is straight forward enough and means we can avoid hacks like this: https://github.com/WhisperSystems/Signal-iOS/blob/master/Signal/src/Models/OWSMessagesBubblesSizeCalculator.m#L27

But if not, I'll just merge in something like this: https://github.com/WhisperSystems/Signal-iOS/compare/fix-tap-directly-on-media-cell%231257

@michaelkirk
Copy link
Contributor Author

closed in #1260

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants