fix create group chatroom

This commit is contained in:
Danmei Chen 2019-01-11 11:52:29 +01:00
parent cfd0edf2f8
commit 5ad93ec6f4
2 changed files with 7 additions and 7 deletions

View file

@ -133,11 +133,6 @@ static UICompositeViewDescription *compositeDescription = nil;
}
- (IBAction)onNextClick:(id)sender {
if (_tableController.contactsGroup.count == 1 && !_isForEditing) {
[self createChatRoom];
return;
}
ChatConversationInfoView *view = VIEW(ChatConversationInfoView);
view.contacts = _tableController.contactsGroup;
view.create = !_isForEditing;

View file

@ -912,8 +912,13 @@ static RootViewManager *rootViewManagerInstance = nil;
LinphoneChatRoomCbs *cbs = linphone_factory_create_chat_room_cbs(linphone_factory_get());
linphone_chat_room_cbs_set_state_changed(cbs, main_view_chat_room_state_changed);
linphone_chat_room_add_callbacks(room, cbs);
linphone_chat_room_add_participants(room, addresses);
if (bctbx_list_size(addresses) == 1) {
//avoid creating ont-to-one chatroom
linphone_chat_room_add_participant(room, addresses->data);
} else {
linphone_chat_room_add_participants(room, addresses);
}
}
- (void)goToChatRoom:(LinphoneChatRoom *)cr {