diff --git a/Classes/ChatConversationInfoView.m b/Classes/ChatConversationInfoView.m index ff9a35cd4..81f9c465d 100644 --- a/Classes/ChatConversationInfoView.m +++ b/Classes/ChatConversationInfoView.m @@ -79,7 +79,7 @@ static UICompositeViewDescription *compositeDescription = nil; ? [NSString stringWithUTF8String:linphone_chat_room_get_subject(_room)] : @""; _nextButton.enabled = _nameLabel.text.length > 0 && _contacts.count > 0; - LinphoneParticipant *me = _room && (linphone_chat_room_get_state(_room) == LinphoneChatRoomStateCreated) + LinphoneParticipant *me = _room && !linphone_chat_room_has_been_left(_room) ? linphone_chat_room_get_me(_room) : NULL; _imAdmin = me diff --git a/Classes/ChatConversationView.m b/Classes/ChatConversationView.m index ef8ef7e23..0e7b5294d 100644 --- a/Classes/ChatConversationView.m +++ b/Classes/ChatConversationView.m @@ -144,9 +144,9 @@ static UICompositeViewDescription *compositeDescription = nil; [self updateParticipantLabel]; - _messageField.editable = (linphone_chat_room_get_state(_chatRoom) == LinphoneChatRoomStateCreated); - _pictureButton.enabled = (linphone_chat_room_get_state(_chatRoom) == LinphoneChatRoomStateCreated); - _messageView.userInteractionEnabled = (linphone_chat_room_get_state(_chatRoom) == LinphoneChatRoomStateCreated); + _messageField.editable = !linphone_chat_room_has_been_left(_chatRoom); + _pictureButton.enabled = !linphone_chat_room_has_been_left(_chatRoom); + _messageView.userInteractionEnabled = !linphone_chat_room_has_been_left(_chatRoom); } - (void)viewWillDisappear:(BOOL)animated { @@ -714,9 +714,9 @@ static UICompositeViewDescription *compositeDescription = nil; void on_chat_room_state_changed(LinphoneChatRoom *cr, LinphoneChatRoomState newState) { ChatConversationView *view = (__bridge ChatConversationView *)linphone_chat_room_cbs_get_user_data(linphone_chat_room_get_callbacks(cr)); - view.messageField.editable = (newState == LinphoneChatRoomStateCreated); - view.pictureButton.enabled = (newState == LinphoneChatRoomStateCreated); - view.messageView.userInteractionEnabled = (newState == LinphoneChatRoomStateCreated); + view.messageField.editable = !linphone_chat_room_has_been_left(cr); + view.pictureButton.enabled = !linphone_chat_room_has_been_left(cr); + view.messageView.userInteractionEnabled = !linphone_chat_room_has_been_left(cr); } void on_chat_room_subject_changed(LinphoneChatRoom *cr, const LinphoneEventLog *event_log) { diff --git a/submodules/linphone b/submodules/linphone index 7c2ce9d17..89ed9caee 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 7c2ce9d173e100d84afb5fb5ef90189a787ddb8d +Subproject commit 89ed9caeebc3e371bdb92ddf3328978da18ba9eb