Merge pull request #40 from nosmirck/feature/onTapUserMessage
Added onUserAvatarTap
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user