mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: whisper: msg preview
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -177,11 +177,16 @@ class _WhisperPageState extends State<WhisperPage> {
|
|||||||
if (content == null || content == "") {
|
if (content == null || content == "") {
|
||||||
content = '不支持的消息类型';
|
content = '不支持的消息类型';
|
||||||
} else {
|
} else {
|
||||||
content = content['text'] ??
|
dynamic msg = content['text'] ??
|
||||||
content['content'] ??
|
content['content'] ??
|
||||||
content['title'] ??
|
content['title'] ??
|
||||||
content['reply_content'] ??
|
content['reply_content'];
|
||||||
content.toString();
|
if (msg == null) {
|
||||||
|
if (content['imageType'] != null) {
|
||||||
|
msg = '[图片消息]';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
content = msg ?? content.toString();
|
||||||
}
|
}
|
||||||
return ListTile(
|
return ListTile(
|
||||||
tileColor: sessionList[i].topTs == 0
|
tileColor: sessionList[i].topTs == 0
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:PiliPlus/common/widgets/network_img_layer.dart';
|
import 'package:PiliPlus/common/widgets/network_img_layer.dart';
|
||||||
import 'package:PiliPlus/utils/utils.dart';
|
import 'package:PiliPlus/utils/utils.dart';
|
||||||
import 'package:PiliPlus/utils/storage.dart';
|
|
||||||
|
|
||||||
import '../../../http/search.dart';
|
import '../../../http/search.dart';
|
||||||
|
|
||||||
@@ -49,13 +48,12 @@ class ChatItem extends StatelessWidget {
|
|||||||
this.item,
|
this.item,
|
||||||
this.eInfos,
|
this.eInfos,
|
||||||
this.onLongPress,
|
this.onLongPress,
|
||||||
});
|
}) : isOwner = onLongPress != null;
|
||||||
|
|
||||||
|
final bool isOwner;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
bool isOwner =
|
|
||||||
item.senderUid == GStorage.userInfo.get('userInfoCache')?.mid;
|
|
||||||
|
|
||||||
bool isPic = item.msgType == MsgType.pic.value; // 图片
|
bool isPic = item.msgType == MsgType.pic.value; // 图片
|
||||||
// bool isText = item.msgType == MsgType.text.value; // 文本
|
// bool isText = item.msgType == MsgType.text.value; // 文本
|
||||||
// bool isArchive = item.msgType == 11; // 投稿
|
// bool isArchive = item.msgType == 11; // 投稿
|
||||||
|
|||||||
Reference in New Issue
Block a user