社区权限修复

hmxc
小赖 4 years ago
parent fd0e7bcf7d
commit 7a970d06fd

@ -43,7 +43,7 @@ class ChatCard extends StatefulWidget {
class _ChatCardState extends State<ChatCard> { class _ChatCardState extends State<ChatCard> {
bool get _isMyself { bool get _isMyself {
final userProvider = Provider.of<UserProvider>(context, listen: false); final userProvider = Provider.of<UserProvider>(context, listen: false);
return (userProvider?.userInfoModel?.id ?? -1) == widget.model.id; return (userProvider?.userInfoModel?.id ?? -1) == widget.model.createId;
} }
String get firstHead { String get firstHead {
@ -149,10 +149,13 @@ class _ChatCardState extends State<ChatCard> {
materialTapTargetSize: materialTapTargetSize:
MaterialTapTargetSize.shrinkWrap, MaterialTapTargetSize.shrinkWrap,
onPressed: () { onPressed: () {
if (widget.model.isComment == 1)
SendAChat.send( SendAChat.send(
parentId: 0, parentId: 0,
themeId: widget.model.id, themeId: widget.model.id,
); );
else
BotToast.showText(text: '不可评论');
}, },
child: [ child: [
Icon(CupertinoIcons.bubble_right, size: 30.w), Icon(CupertinoIcons.bubble_right, size: 30.w),

Loading…
Cancel
Save