mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-26 11:08:44 +00:00
@@ -73,6 +73,30 @@ class WhisperDetailController extends CommonListController<RspSessionMsg, Msg> {
|
||||
int? msgType,
|
||||
int? index,
|
||||
}) async {
|
||||
// debug
|
||||
// if (loadingState.value case Success(:final response)) {
|
||||
// final list = List.of(response ?? <Msg>[])
|
||||
// ..insert(
|
||||
// 0,
|
||||
// Msg.create()..mergeFromProto3Json({
|
||||
// "senderUid": "${account.mid}",
|
||||
// "receiverType": 1,
|
||||
// "receiverId": "$mid",
|
||||
// "msgType": msgType,
|
||||
// "content": jsonEncode({"content": message}),
|
||||
// "msgSeqno": "1",
|
||||
// "timestamp": "${DateTime.now().millisecondsSinceEpoch ~/ 1000}",
|
||||
// "atUids": ["0"],
|
||||
// "msgKey": "2",
|
||||
// "msgSource": msgType,
|
||||
// }),
|
||||
// );
|
||||
// loadingState.value = Success(list);
|
||||
// }
|
||||
// onClearText();
|
||||
// scrollController.jumpToTop();
|
||||
// SmartDialog.showToast('发送成功');
|
||||
// return;
|
||||
assert((message != null) ^ (picMsg != null));
|
||||
if (_isSending) return;
|
||||
_isSending = true;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io' show File;
|
||||
|
||||
import 'package:PiliPlus/common/widgets/chat_list_view.dart';
|
||||
import 'package:PiliPlus/common/widgets/dialog/report.dart';
|
||||
import 'package:PiliPlus/common/widgets/flutter/text_field/text_field.dart';
|
||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||
@@ -153,9 +154,7 @@ class _WhisperDetailPageState
|
||||
Loading() => loadingWidget,
|
||||
Success(:final response) =>
|
||||
response != null && response.isNotEmpty
|
||||
? ListView.separated(
|
||||
shrinkWrap: true,
|
||||
reverse: true,
|
||||
? ChatListView.separated(
|
||||
itemCount: response.length,
|
||||
padding: const EdgeInsets.all(14),
|
||||
physics: const AlwaysScrollableScrollPhysics(
|
||||
|
||||
Reference in New Issue
Block a user