sidemenu: minor fix with multiple accounts and no default

This commit is contained in:
Gautier Pelloux-Prayer 2016-08-22 15:42:40 +02:00
parent 8689faad8e
commit 1b4710312a
3 changed files with 12 additions and 12 deletions

View file

@ -88,7 +88,7 @@
int idx =
linphone_core_get_default_proxy_config(LC)
? bctbx_list_index(linphone_core_get_proxy_config_list(LC), linphone_core_get_default_proxy_config(LC))
: 0;
: HUGE_VAL;
LinphoneProxyConfig *proxy = bctbx_list_nth_data(linphone_core_get_proxy_config_list(LC),
(int)indexPath.row + (idx <= indexPath.row ? 1 : 0));
if (proxy) {

View file

@ -58,7 +58,7 @@
_addressLabel.text = [NSString stringWithUTF8String:linphone_proxy_config_get_identity(default_proxy)];
_presenceImage.image = [StatusBarView imageForState:linphone_proxy_config_get_state(default_proxy)];
} else {
_nameLabel.text = @"No account";
_nameLabel.text = linphone_core_get_proxy_config_list(LC) ? NSLocalizedString(@"No default account", nil) : NSLocalizedString(@"No account", nil);
// display direct IP:port address so that we can be reached
LinphoneAddress *addr = linphone_core_get_primary_contact_parsed(LC);
if (addr) {

View file

@ -14,6 +14,16 @@
<key>DefaultValue</key>
<false/>
</dict>
<dict>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
<key>Title</key>
<string>Account enabled</string>
<key>Key</key>
<string>account_is_enabled_preference</string>
<key>DefaultValue</key>
<false/>
</dict>
<dict>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
@ -230,16 +240,6 @@
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
</dict>
<dict>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
<key>Title</key>
<string>Account enabled</string>
<key>Key</key>
<string>account_is_enabled_preference</string>
<key>DefaultValue</key>
<false/>
</dict>
<dict>
<key>Key</key>
<string>account_mandatory_remove_button</string>