Commit 64ac2c68 authored by DanmeiChen's avatar DanmeiChen
Browse files

hide ephemeral feature

parent 372ac02e
Pipeline #30026 passed with stage
in 6 minutes and 5 seconds
...@@ -1581,14 +1581,16 @@ void on_chat_room_conference_alert(LinphoneChatRoom *cr, const LinphoneEventLog ...@@ -1581,14 +1581,16 @@ void on_chat_room_conference_alert(LinphoneChatRoom *cr, const LinphoneEventLog
[self goToDeviceListView]; [self goToDeviceListView];
} }
if (indexPath.row == 1) { if (indexPath.row == 1) {
EphemeralSettingsView *view = VIEW(EphemeralSettingsView);
view.room = _chatRoom;
[PhoneMainView.instance popToView:view.compositeViewDescription];
}
if (indexPath.row == 2) {
[_tableController onEditClick:nil]; [_tableController onEditClick:nil];
[self onEditionChangeClick: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 { - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
...@@ -1596,7 +1598,7 @@ void on_chat_room_conference_alert(LinphoneChatRoom *cr, const LinphoneEventLog ...@@ -1596,7 +1598,7 @@ void on_chat_room_conference_alert(LinphoneChatRoom *cr, const LinphoneEventLog
} }
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - (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 { - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
...@@ -1607,13 +1609,15 @@ void on_chat_room_conference_alert(LinphoneChatRoom *cr, const LinphoneEventLog ...@@ -1607,13 +1609,15 @@ void on_chat_room_conference_alert(LinphoneChatRoom *cr, const LinphoneEventLog
cell.textLabel.text = NSLocalizedString(@"Conversation's devices",nil); cell.textLabel.text = NSLocalizedString(@"Conversation's devices",nil);
} }
if (indexPath.row == 1) { 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.imageView.image = [LinphoneUtils resizeImage:[UIImage imageNamed:@"delete_default.png"] newSize:CGSizeMake(20, 25)];
cell.textLabel.text = NSLocalizedString(@"Delete messages",nil); 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; cell.imageView.contentMode = UIViewContentModeScaleAspectFit;
return cell; return cell;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment