sidemenu: fix accounts display

This commit is contained in:
Gautier Pelloux-Prayer 2016-01-20 15:20:49 +01:00
parent 6d30048c49
commit 7e12119fe6
2 changed files with 7 additions and 2 deletions

View file

@ -73,7 +73,12 @@
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [[UITableViewCell alloc] init];
if (indexPath.section == 0) {
LinphoneProxyConfig *proxy = ms_list_nth_data(linphone_core_get_proxy_config_list(LC), (int)indexPath.row);
// do not display default account here, it is already in header view
int idx = linphone_core_get_default_proxy_config(LC) ? ms_list_index(linphone_core_get_proxy_config_list(LC),
linphone_core_get_default_proxy_config(LC))
: 0;
LinphoneProxyConfig *proxy = ms_list_nth_data(linphone_core_get_proxy_config_list(LC),
(int)indexPath.row + (idx <= indexPath.row ? 1 : 0));
if (proxy) {
cell.textLabel.text = [NSString stringWithUTF8String:linphone_proxy_config_get_identity(proxy)];
cell.imageView.image = [StatusBarView imageForState:linphone_proxy_config_get_state(proxy)];

View file

@ -55,9 +55,9 @@
linphone_core_enable_log_collection(enabled);
linphone_core_enable_logs_with_cb(linphone_iphone_log_handler);
if (level == 0) {
NSLog(@"I/%s/Disabling all logs", ORTP_LOG_DOMAIN);
linphone_core_set_log_level(ORTP_FATAL);
ortp_set_log_level("ios", ORTP_FATAL);
NSLog(@"I/%s/Disabling all logs", ORTP_LOG_DOMAIN);
} else {
NSLog(@"I/%s/Enabling %s logs", ORTP_LOG_DOMAIN, (enabled ? "all" : "application only"));
linphone_core_set_log_level(level);