ref(chat): remove unused method

This commit is contained in:
Leonard Kim 2019-05-08 13:37:50 -07:00 committed by virtuacoplenny
parent 5cd0b1a9be
commit cb8282dfe5
1 changed files with 0 additions and 31 deletions

View File

@ -87,37 +87,6 @@ class Chat extends AbstractChat<Props> {
);
}
/**
* Iterates over all the messages and creates nested arrays which hold
* consecutive messages sent be the same participant.
*
* @private
* @returns {Array<Array<Object>>}
*/
_getMessagesGroupedBySender() {
const messagesCount = this.props._messages.length;
const groups = [];
let currentGrouping = [];
let currentGroupParticipantId;
for (let i = 0; i < messagesCount; i++) {
const message = this.props._messages[i];
if (message.id === currentGroupParticipantId) {
currentGrouping.push(message);
} else {
groups.push(currentGrouping);
currentGrouping = [ message ];
currentGroupParticipantId = message.id;
}
}
groups.push(currentGrouping);
return groups;
}
/**
* Returns a React Element for showing chat messages and a form to send new
* chat messages.