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

Loading…
Cancel
Save