Support msisdn login

This commit is contained in:
Giom Foret
2017-03-10 11:09:46 +01:00
parent b766005150
commit c43587da76
6 changed files with 134 additions and 42 deletions
+16 -1
View File
@@ -1417,7 +1417,22 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)();
// When displaying the textfield the 1st time, open the keyboard
if (!newPhoneNumberCell)
{
newPhoneCell.isoCountryCode = [MXKAppSettings standardAppSettings].phonebookCountryCode;
NSString *countryCode = [MXKAppSettings standardAppSettings].phonebookCountryCode;
if (!countryCode)
{
// If none, consider the preferred locale
NSLocale *local = [[NSLocale alloc] initWithLocaleIdentifier:[[[NSBundle mainBundle] preferredLocalizations] objectAtIndex:0]];
if ([local respondsToSelector:@selector(countryCode)])
{
countryCode = local.countryCode;
}
if (!countryCode)
{
countryCode = @"GB";
}
}
newPhoneCell.isoCountryCode = countryCode;
newPhoneCell.mxkTextField.text = nil;
newPhoneNumberCell = newPhoneCell;