Closed felixgabler closed 2 years ago
why is it needed exactly? we had that before and removed it in favour of a link, cause the tappable area of text and image is huge and it resulted in tons of unwanted taps.
Oh, I didn't know you had it. At my project, we had users think it is a bug that it's not tappable because all the other modern chat apps open their previews when the image or the title is tapped. It basically is as if the title is a link itself.
That's why link has a different style and is highlighted. In Telegram only links are tappable. In Facebook Messenger there is no preview at all, but links are highlighted too. On the other hand when we had that before, and I installed the app on the phone, I would click literally every link while scrolling the chat (if a lot of links is sent) which was frustrating as hell. So this can be an option maybe (although I doubt highlighted link is worse than accidental taps which take you out of the app), but definitely not a default behaviour.
Definitely, I can make it optional
I have now made it optional. Is this better?
Thanks for the PR!
Renamed to openOnPreviewImageTap
and openOnPreviewTitleTap
since there is no "click" in mobile :)
Should I make this configurable through some parameters? Also, can the
data.link
ever be null?