From 7a970d06fdd3a022e0594930205f02da7c98c06d Mon Sep 17 00:00:00 2001 From: laiiihz Date: Mon, 29 Mar 2021 17:42:13 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E6=9D=83=E9=99=90=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../community_views/widgets/chat_card.dart | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/ui/community/community_views/widgets/chat_card.dart b/lib/ui/community/community_views/widgets/chat_card.dart index ad7dd5ba..1a8c6baa 100644 --- a/lib/ui/community/community_views/widgets/chat_card.dart +++ b/lib/ui/community/community_views/widgets/chat_card.dart @@ -43,7 +43,7 @@ class ChatCard extends StatefulWidget { class _ChatCardState extends State { bool get _isMyself { final userProvider = Provider.of(context, listen: false); - return (userProvider?.userInfoModel?.id ?? -1) == widget.model.id; + return (userProvider?.userInfoModel?.id ?? -1) == widget.model.createId; } String get firstHead { @@ -149,10 +149,13 @@ class _ChatCardState extends State { materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, onPressed: () { - SendAChat.send( - parentId: 0, - themeId: widget.model.id, - ); + if (widget.model.isComment == 1) + SendAChat.send( + parentId: 0, + themeId: widget.model.id, + ); + else + BotToast.showText(text: '不可评论'); }, child: [ Icon(CupertinoIcons.bubble_right, size: 30.w),