From 306a9c4de5580b4614dc52711a6be27b5458987e Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Mon, 10 Jan 2022 12:24:17 -0800 Subject: [PATCH] Fix #295 - Clicking on an Avatar in P2P Chat should not result in an action --- lib/widgets/messagerow.dart | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/widgets/messagerow.dart b/lib/widgets/messagerow.dart index 1e35eb6d..14514133 100644 --- a/lib/widgets/messagerow.dart +++ b/lib/widgets/messagerow.dart @@ -55,6 +55,7 @@ class MessageRowState extends State with SingleTickerProviderStateMi Widget build(BuildContext context) { var fromMe = Provider.of(context).senderHandle == Provider.of(context).onion; var isContact = Provider.of(context).contactList.findContact(Provider.of(context).senderHandle) != null; + var isGroup = Provider.of(context).contactList.getContact(Provider.of(context, listen: false).conversationIdentifier)!.isGroup; var isBlocked = isContact ? Provider.of(context).contactList.findContact(Provider.of(context).senderHandle)!.isBlocked : false; var actualMessage = Flexible(flex: Platform.isAndroid ? 10 : 3, fit: FlexFit.loose, child: widget.child); @@ -148,17 +149,24 @@ class MessageRowState extends State with SingleTickerProviderStateMi } else { var contact = Provider.of(context); Widget wdgPortrait = GestureDetector( - onTap: isContact ? _btnGoto : _btnAdd, + onTap: !isGroup + ? null + : isContact + ? _btnGoto + : _btnAdd, child: Padding( padding: EdgeInsets.all(4.0), child: ProfileImage( diameter: 48.0, imagePath: Provider.of(context).senderImage ?? contact.imagePath, - //maskOut: contact.status != "Authenticated", border: contact.status == "Authenticated" ? Provider.of(context).theme.portraitOnlineBorderColor : Provider.of(context).theme.portraitOfflineBorderColor, badgeTextColor: Colors.red, badgeColor: Colors.red, - tooltip: isContact ? AppLocalizations.of(context)!.contactGoto.replaceFirst("%1", senderDisplayStr) : AppLocalizations.of(context)!.addContact, + tooltip: !isGroup + ? "" + : isContact + ? AppLocalizations.of(context)!.contactGoto.replaceFirst("%1", senderDisplayStr) + : AppLocalizations.of(context)!.addContact, ))); widgetRow = [