This commit is contained in:
2022-10-26 14:53:22 +08:00
parent 72807d7233
commit 875b44ffb9
8 changed files with 28 additions and 37 deletions

View File

@@ -42,32 +42,6 @@ class _MessageListState extends State<MessageList> {
axis: Axis.vertical,
);
/// 接收到消息 和 自己发送消息 使列表滚动到最底部
// eventBus.on().listen((event) {
// if (TimMessageService.to.curConversationId ==
// widget.conversation.conversationID) {
// if (event is V2TimMessage) {
// if (mounted) {
// setState(() {
// TimMessageService.to.addMessage(event);
// });
// }
// _scrollController.scrollToIndex(
// TimMessageService.to.messages.length - 1,
// preferPosition: AutoScrollPosition.begin,
// );
// }
// }
// if (event is String && event == 'scrollToBottom') {
// Future.delayed(const Duration(milliseconds: 200), () {
// _scrollController.animateTo(
// _scrollController.position.maxScrollExtent,
// duration: const Duration(milliseconds: 200),
// curve: Curves.easeOut,
// );
// });
// }
// });
_loadMessages();
}