From dc5de5eb45bacce673ce6fba09af9f0eee0e89e3 Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Thu, 9 Nov 2017 16:08:06 +0100 Subject: [PATCH] UI enhancement --- Classes/ChatConversationView.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Classes/ChatConversationView.m b/Classes/ChatConversationView.m index ca0963e2b..1de3c207f 100644 --- a/Classes/ChatConversationView.m +++ b/Classes/ChatConversationView.m @@ -137,8 +137,9 @@ static UICompositeViewDescription *compositeDescription = nil; [self updateParticipantLabel]; - _messageField.editable = !(linphone_chat_room_get_state(_chatRoom) == LinphoneChatRoomStateTerminated); - _messageView.userInteractionEnabled = !(linphone_chat_room_get_state(_chatRoom) == LinphoneChatRoomStateTerminated); + _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); } - (void)viewWillDisappear:(BOOL)animated { @@ -707,6 +708,7 @@ 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); }