Browse Source

发消息修改

wr_202303
zsw 4 months ago
parent
commit
8901786710
  1. 20
      lib/im/chat_details_page.dart
  2. 2
      lib/im/database/message.dart

20
lib/im/chat_details_page.dart

@ -336,7 +336,7 @@ class _ChatDetailsPage extends State<ChatDetailsPage>
Widget chatDetailsItem(Message message) {
bool isSelf = message.fromId == selfUserId;
bool isText = message.msgType == 0;
bool isText = message.msgType == 1;
return Container(
padding: EdgeInsets.only(
top: 32.h,
@ -354,17 +354,17 @@ class _ChatDetailsPage extends State<ChatDetailsPage>
),
if (messages.indexOf(message) == (messages.length - 1))
Padding(
padding: EdgeInsets.only(top: 10.h, bottom: 24.h),
child: Text(
"在对方未回复或关注你之前,你只能发送一条信息",
textAlign: TextAlign.center,
style: TextStyle(
color: Color(0xFFA29E9E),
fontSize: 10.sp,
fontWeight: MyFontWeight.regular,
padding: EdgeInsets.only(top: 10.h, bottom: 24.h),
child: Text(
"在对方未回复或关注你之前,你只能发送一条信息",
textAlign: TextAlign.center,
style: TextStyle(
color: Color(0xFFA29E9E),
fontSize: 10.sp,
fontWeight: MyFontWeight.regular,
),
),
),
),
if (messages.indexOf(message) == (messages.length - 1))
SizedBox(
height: 16.h,

2
lib/im/database/message.dart

@ -56,7 +56,7 @@ createMessage(var toId, String content, {String attach, int msgType, userId, rep
"replyId": replyId,
"content": content,
"attach": attach,
"msgType": msgType ?? 0,
"msgType": msgType ?? 1,
"time": "${DateTime.now().millisecondsSinceEpoch}",
"state": 0,
"isDelete": 0

Loading…
Cancel
Save