fix(ui): use ogScrapeUrl for link attachments

This commit is contained in:
Salvatore Giordano
2022-04-26 11:53:58 +02:00
parent 76f6ce6d0f
commit ff028948cf
8 changed files with 28 additions and 22 deletions
@@ -37,11 +37,11 @@ class UrlAttachment extends StatelessWidget {
final chatThemeData = StreamChatTheme.of(context);
return GestureDetector(
onTap: () {
final titleLink = urlAttachment.titleLink;
if (titleLink != null) {
final ogScrapeUrl = urlAttachment.ogScrapeUrl;
if (ogScrapeUrl != null) {
onLinkTap != null
? onLinkTap!(titleLink)
: launchURL(context, titleLink);
? onLinkTap!(ogScrapeUrl)
: launchURL(context, ogScrapeUrl);
}
},
child: Column(