Merge branch 'design'

This commit is contained in:
guozhigq
2024-12-14 18:35:03 +08:00
2 changed files with 6 additions and 4 deletions

View File

@ -111,7 +111,7 @@ class SessionList {
class LastMsg { class LastMsg {
LastMsg({ LastMsg({
this.senderIid, this.senderUid,
this.receiverType, this.receiverType,
this.receiverId, this.receiverId,
this.msgType, this.msgType,
@ -125,7 +125,7 @@ class LastMsg {
// this.newFaceVersion, // this.newFaceVersion,
}); });
int? senderIid; int? senderUid;
int? receiverType; int? receiverType;
int? receiverId; int? receiverId;
int? msgType; int? msgType;
@ -139,7 +139,7 @@ class LastMsg {
// int? newFaceVersion; // int? newFaceVersion;
LastMsg.fromJson(Map<String, dynamic> json) { LastMsg.fromJson(Map<String, dynamic> json) {
senderIid = json['sender_uid']; senderUid = json['sender_uid'];
receiverType = json['receiver_type']; receiverType = json['receiver_type'];
receiverId = json['receiver_id']; receiverId = json['receiver_id'];
msgType = json['msg_type']; msgType = json['msg_type'];

View File

@ -6,6 +6,7 @@ import 'package:pilipala/common/skeleton/skeleton.dart';
import 'package:pilipala/common/widgets/http_error.dart'; import 'package:pilipala/common/widgets/http_error.dart';
import 'package:pilipala/common/widgets/network_img_layer.dart'; import 'package:pilipala/common/widgets/network_img_layer.dart';
import 'package:pilipala/common/widgets/no_data.dart'; import 'package:pilipala/common/widgets/no_data.dart';
import 'package:pilipala/utils/global_data_cache.dart';
import 'package:pilipala/utils/utils.dart'; import 'package:pilipala/utils/utils.dart';
import 'controller.dart'; import 'controller.dart';
@ -236,6 +237,7 @@ class SessionItem extends StatelessWidget {
final content = sessionItem.lastMsg.content; final content = sessionItem.lastMsg.content;
final msgStatus = sessionItem.lastMsg.msgStatus; final msgStatus = sessionItem.lastMsg.msgStatus;
final int msgType = sessionItem.lastMsg.msgType; final int msgType = sessionItem.lastMsg.msgType;
final int senderUid = sessionItem.lastMsg.senderUid;
return ListTile( return ListTile(
onTap: () { onTap: () {
@ -269,7 +271,7 @@ class SessionItem extends StatelessWidget {
title: Text(sessionItem.accountInfo?.name ?? ''), title: Text(sessionItem.accountInfo?.name ?? ''),
subtitle: Text( subtitle: Text(
msgStatus == 1 msgStatus == 1
? '撤回了一条消息' ? '${senderUid == GlobalDataCache.userInfo?.mid ? '' : '对方'}撤回了一条消息'
: msgType == 2 : msgType == 2
? '[图片]' ? '[图片]'
: content != null && content != '' : content != null && content != ''