diff --git a/Classes/ChatConversationView.m b/Classes/ChatConversationView.m index fc5b8b989..e9d92230b 100644 --- a/Classes/ChatConversationView.m +++ b/Classes/ChatConversationView.m @@ -1581,14 +1581,16 @@ void on_chat_room_conference_alert(LinphoneChatRoom *cr, const LinphoneEventLog [self goToDeviceListView]; } if (indexPath.row == 1) { - EphemeralSettingsView *view = VIEW(EphemeralSettingsView); - view.room = _chatRoom; - [PhoneMainView.instance popToView:view.compositeViewDescription]; - } - if (indexPath.row == 2) { [_tableController onEditClick:nil]; [self onEditionChangeClick:nil]; } + if ([ConfigManager.instance lpConfigBoolForKeyWithKey:@"ephemeral_feature" defaultValue:false]) { + if (indexPath.row == 2) { + EphemeralSettingsView *view = VIEW(EphemeralSettingsView); + view.room = _chatRoom; + [PhoneMainView.instance popToView:view.compositeViewDescription]; + } + } } - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { @@ -1596,7 +1598,7 @@ void on_chat_room_conference_alert(LinphoneChatRoom *cr, const LinphoneEventLog } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - return 3; + return [ConfigManager.instance lpConfigBoolForKeyWithKey:@"ephemeral_feature" defaultValue:false] ? 3 : 2; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { @@ -1607,13 +1609,15 @@ void on_chat_room_conference_alert(LinphoneChatRoom *cr, const LinphoneEventLog cell.textLabel.text = NSLocalizedString(@"Conversation's devices",nil); } if (indexPath.row == 1) { - cell.imageView.image = [LinphoneUtils resizeImage:[UIImage imageNamed:@"ephemeral_messages_default.png"] newSize:CGSizeMake(20, 25)]; - cell.textLabel.text = NSLocalizedString(@"Ephemeral messages",nil); - } - if (indexPath.row == 2) { cell.imageView.image = [LinphoneUtils resizeImage:[UIImage imageNamed:@"delete_default.png"] newSize:CGSizeMake(20, 25)]; cell.textLabel.text = NSLocalizedString(@"Delete messages",nil); } + if ([ConfigManager.instance lpConfigBoolForKeyWithKey:@"ephemeral_feature" defaultValue:false]) { + if (indexPath.row == 2) { + cell.imageView.image = [LinphoneUtils resizeImage:[UIImage imageNamed:@"ephemeral_messages_default.png"] newSize:CGSizeMake(20, 25)]; + cell.textLabel.text = NSLocalizedString(@"Ephemeral messages",nil); + } + } cell.imageView.contentMode = UIViewContentModeScaleAspectFit; return cell; }