From 50037b842a791c8a15275fdf03636f037cd6a4ed Mon Sep 17 00:00:00 2001 From: "DESKTOP-KFV16CV\\cyt" <2268162076@qq.com> Date: Thu, 16 Sep 2021 09:57:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/Common/ChatSystem/Items/UserInfoItemView.cs | 1 + .../Common/ChatSystem/PrivateChat/PrivateChatPanel.cs | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/Assets/Scripts/Common/ChatSystem/Items/UserInfoItemView.cs b/Assets/Scripts/Common/ChatSystem/Items/UserInfoItemView.cs index 9a6bf72..ae15920 100644 --- a/Assets/Scripts/Common/ChatSystem/Items/UserInfoItemView.cs +++ b/Assets/Scripts/Common/ChatSystem/Items/UserInfoItemView.cs @@ -37,6 +37,7 @@ public class UserInfoItemView : MonoBehaviour { //发送创建频道消息 ChatManager.Instance.CreatePrivateChatChannel(data.UserInfo); + parentView.SetListItemCount0(); } else { diff --git a/Assets/Scripts/Common/ChatSystem/PrivateChat/PrivateChatPanel.cs b/Assets/Scripts/Common/ChatSystem/PrivateChat/PrivateChatPanel.cs index 384d82f..7443581 100644 --- a/Assets/Scripts/Common/ChatSystem/PrivateChat/PrivateChatPanel.cs +++ b/Assets/Scripts/Common/ChatSystem/PrivateChat/PrivateChatPanel.cs @@ -260,6 +260,10 @@ public class PrivateChatPanel : UIView ChatInputField.ActivateInputField(); } + public void SetListItemCount0() + { + LoopListView.SetListItemCount(0, false); + } /// /// 刷新LoopList /// @@ -270,6 +274,7 @@ public class PrivateChatPanel : UIView // 更新前数据 int nextItemIndex = LoopListView.ItemTotalCount; //增加新条目刷新UI + LoopListView.SetListItemCount(0, false); LoopListView.SetListItemCount(ChatManager.Instance.Msgs[currentChannel.ID].Count, false); if (nextItemIndex < ChatManager.Instance.Msgs[currentChannel.ID].Count) {