From 246061c69ed34ea3a1f9aa87f7d9e946bfd54f1c Mon Sep 17 00:00:00 2001 From: bggRGjQaUbCoE Date: Tue, 22 Apr 2025 20:32:44 +0800 Subject: [PATCH] mod: view user from whisper Signed-off-by: bggRGjQaUbCoE --- lib/pages/whisper/widgets/item.dart | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/lib/pages/whisper/widgets/item.dart b/lib/pages/whisper/widgets/item.dart index a9e1bb3e7..5185a68f5 100644 --- a/lib/pages/whisper/widgets/item.dart +++ b/lib/pages/whisper/widgets/item.dart @@ -99,13 +99,22 @@ class WhisperSessionItem extends StatelessWidget { type: 'avatar', src: item.accountInfo?.face ?? "", ); - return item.unreadCount != null && item.unreadCount! > 0 - ? Badge( - label: Text(" ${item.unreadCount} "), - alignment: Alignment.topRight, - child: buildAvatar(), - ) - : buildAvatar(); + return GestureDetector( + onTap: item.accountInfo?.mid != null + ? () { + Get.toNamed( + '/member?mid=${item.accountInfo!.mid}', + ); + } + : null, + child: item.unreadCount != null && item.unreadCount! > 0 + ? Badge( + label: Text(" ${item.unreadCount} "), + alignment: Alignment.topRight, + child: buildAvatar(), + ) + : buildAvatar(), + ); }, ), title: Text(item.accountInfo?.name ?? ""),