Replace use of deprecated function “linphone_chat_room_has_been_left” with “linphone_chat_room_is_read_only”

This commit is contained in:
QuentinArguillere 2022-03-21 12:05:03 +01:00
parent 9456e7c229
commit c55a0677e2
2 changed files with 5 additions and 5 deletions

View file

@ -114,7 +114,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_has_been_left(_room)
LinphoneParticipant *me = _room && !linphone_chat_room_is_read_only(_room)
? linphone_chat_room_get_me(_room)
: NULL;
_imAdmin = me

View file

@ -425,13 +425,13 @@ static UICompositeViewDescription *compositeDescription = nil;
_messageField.editable = TRUE;
_pictureButton.enabled = TRUE;
_messageView.userInteractionEnabled = TRUE;
if (linphone_chat_room_has_been_left(_chatRoom)) {
if (linphone_chat_room_is_read_only(_chatRoom)) {
linphone_chat_room_add_participant(_chatRoom, linphone_participant_get_address(linphone_chat_room_get_me(_chatRoom)));
}
} else {
_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);
_messageField.editable = !linphone_chat_room_is_read_only(_chatRoom);
_pictureButton.enabled = !linphone_chat_room_is_read_only(_chatRoom);
_messageView.userInteractionEnabled = !linphone_chat_room_is_read_only(_chatRoom);
}
}