mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
better management of chat room cbs
This commit is contained in:
parent
10e79db8c2
commit
712ba1f100
1 changed files with 9 additions and 0 deletions
|
|
@ -162,6 +162,15 @@ static int sorted_history_comparison(LinphoneChatRoom *to_insert, LinphoneChatRo
|
|||
|
||||
LinphoneChatRoom *chatRoom = (LinphoneChatRoom *)bctbx_list_nth_data(_data, (int)[indexPath row]);
|
||||
ChatConversationView *view = VIEW(ChatConversationView);
|
||||
LinphoneChatRoom *oldRoom = view.chatRoom;
|
||||
if (oldRoom) {
|
||||
LinphoneChatRoomCbs *oldCbs = linphone_chat_room_get_current_callbacks(oldRoom);
|
||||
if (oldCbs && view.chatRoomCbs && oldCbs == view.chatRoomCbs) {
|
||||
linphone_chat_room_remove_callbacks(oldRoom, view.chatRoomCbs);
|
||||
view.chatRoomCbs = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
view.chatRoom = chatRoom;
|
||||
// on iPad, force unread bubble to disappear by reloading the cell
|
||||
if (IPAD) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue