コード例 #1
0
        private void AddMessage <T>(T messageData, MessageViewsPool pool) where T : ChatMessage
        {
            var messageView = pool.GetChatView();

            messageView.FillWithInfo(messageData);
            messageView.onRemoveButtonClickEvent.AddListener(() => { DeleteMessageCall.Invoke(messageData.Id); });
            messageView.ShowWithAnimation();
            MessageViews.Add(messageView);
            CheckMessagesBlock(MessageViews.IndexOf(messageView));
            messageView.transform.SetAsLastSibling();
        }