private void OnMessageHistoryReceived(Club.ClubMessageHistoryReceivedEvent historyEvent) { this.m_childCountBeforeRefresh = this.m_chatContent.transform.childCount; this.m_focusedStream.HandleClubMessageHistoryEvent(historyEvent); this.RebuildMessageList(); this.m_requestPending = false; }
public void HandleClubMessageHistoryEvent(Club.ClubMessageHistoryReceivedEvent historyEvent) { if (historyEvent.ClubID != this.m_clubId || historyEvent.StreamID != this.StreamId) { return; } List <ClubMessageInfo> messagesInRange = Club.GetMessagesInRange(this.m_clubId, this.StreamId, historyEvent.ContiguousRange.oldestMessageId, historyEvent.ContiguousRange.newestMessageId); this.m_messages.Clear(); foreach (ClubMessageInfo messageInfo in messagesInRange) { this.m_messages.Add(new CommunityChatMessage(messageInfo)); } }
public void HandleClubMessageHistoryEvent(Club.ClubMessageHistoryReceivedEvent historyEvent) { if (historyEvent.ClubID != this.m_clubId || historyEvent.StreamID != this.StreamId) { return; } ulong mClubId = this.m_clubId; ulong streamId = this.StreamId; ClubMessageIdentifier contiguousRange = historyEvent.ContiguousRange.oldestMessageId; ClubMessageRange clubMessageRange = historyEvent.ContiguousRange; List <ClubMessageInfo> messagesInRange = Club.GetMessagesInRange(mClubId, streamId, contiguousRange, clubMessageRange.newestMessageId); this.m_messages.Clear(); foreach (ClubMessageInfo clubMessageInfo in messagesInRange) { this.m_messages.Add(new CommunityChatMessage(clubMessageInfo)); } }