mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-31 10:19:23 +00:00
Merge branch 'master' of gitlab.linphone.org:BC/public/linphone-iphone
This commit is contained in:
commit
1b96a21993
2 changed files with 6 additions and 4 deletions
|
|
@ -343,9 +343,7 @@ static const CGFloat MESSAGE_SPACING_PERCENTAGE = 1.f;
|
|||
- (void) tableView:(UITableView *)tableView deleteRowAtIndex:(NSIndexPath *)indexPath {
|
||||
[tableView beginUpdates];
|
||||
LinphoneEventLog *event = [[eventList objectAtIndex:indexPath.row] pointerValue];
|
||||
// TODO: fix workaround
|
||||
//linphone_event_log_delete_from_database(event);
|
||||
linphone_chat_room_delete_message(_chatRoom, linphone_event_log_get_chat_message(event));
|
||||
linphone_event_log_delete_from_database(event);
|
||||
NSInteger index = indexPath.row + _currentIndex + (totalEventList.count - eventList.count);
|
||||
if (index < totalEventList.count)
|
||||
[totalEventList removeObjectAtIndex:index];
|
||||
|
|
|
|||
|
|
@ -63,7 +63,11 @@
|
|||
if (!chatRoom)
|
||||
continue;
|
||||
|
||||
linphone_chat_room_remove_callbacks(chatRoom, linphone_chat_room_get_current_callbacks(chatRoom));
|
||||
|
||||
LinphoneChatRoomCbs *cbs = linphone_chat_room_get_current_callbacks(chatRoom);
|
||||
if (cbs) {// If the view is getting changed while a chatroom deletion is in progress, the callbacks may already have been deleted despite the chatroom still being there, causing a potential crash.
|
||||
linphone_chat_room_remove_callbacks(chatRoom, cbs);
|
||||
}
|
||||
_chatRooms = _chatRooms->next;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue