mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
fix isFirst chat cell not showed correctly
This commit is contained in:
parent
317665a90b
commit
368f1e1810
1 changed files with 4 additions and 5 deletions
|
|
@ -193,12 +193,11 @@ static const int BASIC_EVENT_LIST=15;
|
|||
- (BOOL)isFirstIndexInTableView:(NSIndexPath *)indexPath chat:(LinphoneChatMessage *)chat {
|
||||
LinphoneEventLog *previousEvent = nil;
|
||||
NSInteger indexOfPreviousEvent = indexPath.row - 1;
|
||||
while (!previousEvent && indexOfPreviousEvent > -1) {
|
||||
LinphoneEventLog *tmp = [[eventList objectAtIndex:indexOfPreviousEvent] pointerValue];
|
||||
if (linphone_event_log_get_type(tmp) == LinphoneEventLogTypeConferenceChatMessage) {
|
||||
previousEvent = tmp;
|
||||
if (indexOfPreviousEvent > -1) {
|
||||
previousEvent = [[eventList objectAtIndex:indexOfPreviousEvent] pointerValue];
|
||||
if (linphone_event_log_get_type(previousEvent) != LinphoneEventLogTypeConferenceChatMessage) {
|
||||
return TRUE;
|
||||
}
|
||||
--indexOfPreviousEvent;
|
||||
}
|
||||
if (!previousEvent)
|
||||
return TRUE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue