Merge pull request #40 from nosmirck/feature/onTapUserMessage

Added onUserAvatarTap
This commit is contained in:
Salvatore Giordano
2020-04-24 16:53:51 +02:00
parent 9ec2b02a92
commit ce34b6afa1
3 changed files with 57 additions and 28 deletions
+8 -1
View File
@@ -41,6 +41,7 @@ class MessageWidget extends StatefulWidget {
@required this.message,
@required this.nextMessage,
this.onThreadTap,
this.onUserAvatarTap,
this.onMessageActions,
this.isParent = false,
this.onMentionTap,
@@ -70,6 +71,9 @@ class MessageWidget extends StatefulWidget {
/// The function called when tapping on replies
final void Function(Message) onThreadTap;
/// The function called when tapping on UserAvatar
final void Function(User) onUserAvatarTap;
/// True if this is the parent of the thread being showed
final bool isParent;
@@ -161,7 +165,10 @@ class _MessageWidgetState extends State<MessageWidget>
),
child: Row(
children: <Widget>[
UserAvatar(user: widget.message.user),
UserAvatar(
user: widget.message.user,
onTap: widget.onUserAvatarTap,
),
if (_isMyMessage && widget.nextMessage == null)
SendingIndicator(
message: widget.message,