mod: whisper senderUid
This commit is contained in:
@ -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'];
|
||||
|
@ -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 != ''
|
||||
|
Reference in New Issue
Block a user