mod: whisper senderUid

This commit is contained in:
guozhigq
2024-12-13 22:45:30 +08:00
parent 9a20f246d3
commit a8677e094a
2 changed files with 6 additions and 4 deletions

View File

@ -111,7 +111,7 @@ class SessionList {
class LastMsg {
LastMsg({
this.senderIid,
this.senderUid,
this.receiverType,
this.receiverId,
this.msgType,
@ -125,7 +125,7 @@ class LastMsg {
// this.newFaceVersion,
});
int? senderIid;
int? senderUid;
int? receiverType;
int? receiverId;
int? msgType;
@ -139,7 +139,7 @@ class LastMsg {
// int? newFaceVersion;
LastMsg.fromJson(Map<String, dynamic> json) {
senderIid = json['sender_uid'];
senderUid = json['sender_uid'];
receiverType = json['receiver_type'];
receiverId = json['receiver_id'];
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/network_img_layer.dart';
import 'package:pilipala/common/widgets/no_data.dart';
import 'package:pilipala/utils/global_data_cache.dart';
import 'package:pilipala/utils/utils.dart';
import 'controller.dart';
@ -236,6 +237,7 @@ class SessionItem extends StatelessWidget {
final content = sessionItem.lastMsg.content;
final msgStatus = sessionItem.lastMsg.msgStatus;
final int msgType = sessionItem.lastMsg.msgType;
final int senderUid = sessionItem.lastMsg.senderUid;
return ListTile(
onTap: () {
@ -269,7 +271,7 @@ class SessionItem extends StatelessWidget {
title: Text(sessionItem.accountInfo?.name ?? ''),
subtitle: Text(
msgStatus == 1
? '撤回了一条消息'
? '${senderUid == GlobalDataCache.userInfo?.mid ? '' : '对方'}撤回了一条消息'
: msgType == 2
? '[图片]'
: content != null && content != ''