Browse Source

同步修改

symybb
曹衍涛 4 years ago
parent
commit
50037b842a
  1. 1
      Assets/Scripts/Common/ChatSystem/Items/UserInfoItemView.cs
  2. 5
      Assets/Scripts/Common/ChatSystem/PrivateChat/PrivateChatPanel.cs

1
Assets/Scripts/Common/ChatSystem/Items/UserInfoItemView.cs

@ -37,6 +37,7 @@ public class UserInfoItemView : MonoBehaviour
{ {
//发送创建频道消息 //发送创建频道消息
ChatManager.Instance.CreatePrivateChatChannel(data.UserInfo); ChatManager.Instance.CreatePrivateChatChannel(data.UserInfo);
parentView.SetListItemCount0();
} }
else else
{ {

5
Assets/Scripts/Common/ChatSystem/PrivateChat/PrivateChatPanel.cs

@ -260,6 +260,10 @@ public class PrivateChatPanel : UIView
ChatInputField.ActivateInputField(); ChatInputField.ActivateInputField();
} }
public void SetListItemCount0()
{
LoopListView.SetListItemCount(0, false);
}
/// <summary> /// <summary>
/// 刷新LoopList /// 刷新LoopList
/// </summary> /// </summary>
@ -270,6 +274,7 @@ public class PrivateChatPanel : UIView
// 更新前数据 // 更新前数据
int nextItemIndex = LoopListView.ItemTotalCount; int nextItemIndex = LoopListView.ItemTotalCount;
//增加新条目刷新UI //增加新条目刷新UI
LoopListView.SetListItemCount(0, false);
LoopListView.SetListItemCount(ChatManager.Instance.Msgs[currentChannel.ID].Count, false); LoopListView.SetListItemCount(ChatManager.Instance.Msgs[currentChannel.ID].Count, false);
if (nextItemIndex < ChatManager.Instance.Msgs[currentChannel.ID].Count) if (nextItemIndex < ChatManager.Instance.Msgs[currentChannel.ID].Count)
{ {

Loading…
Cancel
Save