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) {