is_read_only -> has_been_left

This commit is contained in:
Benjamin Reis 2017-12-01 10:09:27 +01:00
parent 41253672a6
commit 8eaa148918
3 changed files with 8 additions and 8 deletions

View file

@ -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

View file

@ -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) {

@ -1 +1 @@
Subproject commit 7c2ce9d173e100d84afb5fb5ef90189a787ddb8d
Subproject commit 89ed9caeebc3e371bdb92ddf3328978da18ba9eb