forked from mirrors/linphone-iphone
the maximum interval between 2 agglomerated chats at 5mn
This commit is contained in:
parent
52d83cc40e
commit
b9d7c07fda
1 changed files with 6 additions and 0 deletions
|
|
@ -166,6 +166,8 @@
|
|||
[self reloadData];
|
||||
}
|
||||
|
||||
static const int MAX_AGGLOMERATED_TIME=300;
|
||||
|
||||
- (BOOL)isFirstIndexInTableView:(NSIndexPath *)indexPath chat:(LinphoneChatMessage *)chat {
|
||||
LinphoneEventLog *previousEvent = nil;
|
||||
NSInteger indexOfPreviousEvent = indexPath.row - 1;
|
||||
|
|
@ -183,6 +185,10 @@
|
|||
if (!linphone_address_equal(linphone_chat_message_get_from_address(previousChat), linphone_chat_message_get_from_address(chat))) {
|
||||
return TRUE;
|
||||
}
|
||||
// the maximum interval between 2 agglomerated chats at 5mn
|
||||
if ((linphone_chat_message_get_time(chat)-linphone_chat_message_get_time(previousChat)) > MAX_AGGLOMERATED_TIME) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue