diff --git a/Classes/ChatConversationTableView.m b/Classes/ChatConversationTableView.m index 031aa723a..2cb6664fb 100644 --- a/Classes/ChatConversationTableView.m +++ b/Classes/ChatConversationTableView.m @@ -255,11 +255,11 @@ static const int BASIC_EVENT_LIST=15; kCellId = NSStringFromClass(UIChatBubblePhotoCell.class); else kCellId = NSStringFromClass(UIChatBubbleTextCell.class); - + + // To use less memory and to avoid overlapping. To be improved. UIChatBubbleTextCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellId]; - if (!cell) { - cell = [[NSClassFromString(kCellId) alloc] initWithIdentifier:kCellId]; - } + cell = [[NSClassFromString(kCellId) alloc] initWithIdentifier:kCellId]; + [cell setEvent:event]; if (chat) { cell.isFirst = [self isFirstIndexInTableView:indexPath chat:chat];