mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
Assistant: add possibility to skip registration validation
This commit is contained in:
parent
c549024029
commit
d27ceba213
3 changed files with 24 additions and 16 deletions
|
|
@ -520,11 +520,15 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
if ([message isEqualToString:@"Forbidden"]) {
|
||||
message = NSLocalizedString(@"Incorrect username or password.", nil);
|
||||
}
|
||||
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Registration failure", nil)
|
||||
DTAlertView *alert = [[DTAlertView alloc] initWithTitle:NSLocalizedString(@"Registration failure", nil)
|
||||
message:message
|
||||
delegate:nil
|
||||
cancelButtonTitle:@"OK"
|
||||
cancelButtonTitle:@"Cancel"
|
||||
otherButtonTitles:nil];
|
||||
[alert addButtonWithTitle:@"Continue"
|
||||
block:^(void) {
|
||||
[PhoneMainView.instance changeCurrentView:DialerView.compositeViewDescription];
|
||||
}];
|
||||
[alert show];
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -879,20 +879,19 @@ static void linphone_iphone_popup_password_request(LinphoneCore *lc, const char
|
|||
NSString *username = [NSString stringWithUTF8String:usernameC];
|
||||
NSString *domain = [NSString stringWithUTF8String:domainC];
|
||||
alertView = [[DTAlertView alloc]
|
||||
initWithTitle:NSLocalizedString(@"Authentication needed.", nil)
|
||||
message:[NSString stringWithFormat:NSLocalizedString(@"Registration failed because authentication is "
|
||||
@"missing or invalid for %@@%@.\nYou can "
|
||||
@"provide password again, or check your "
|
||||
@"account configuration in the settings.",
|
||||
nil),
|
||||
username, realm]];
|
||||
alertView.alertViewStyle = UIAlertViewStyleSecureTextInput;
|
||||
[alertView addCancelButtonWithTitle:NSLocalizedString(@"Go to settings", nil)
|
||||
block:^{
|
||||
SettingsView *view = VIEW(SettingsView);
|
||||
[PhoneMainView.instance changeCurrentView:view.compositeViewDescription];
|
||||
}];
|
||||
initWithTitle:NSLocalizedString(@"Authentication needed.", nil)
|
||||
message:[NSString
|
||||
stringWithFormat:NSLocalizedString(@"Registration failed because authentication is "
|
||||
@"missing or invalid for %@@%@.\nYou can "
|
||||
@"provide password again, or check your "
|
||||
@"account configuration in the settings.",
|
||||
nil),
|
||||
username, realm]
|
||||
delegate:nil
|
||||
cancelButtonTitle:NSLocalizedString(@"Cancel", nil)
|
||||
otherButtonTitles:nil];
|
||||
|
||||
alertView.alertViewStyle = UIAlertViewStyleSecureTextInput;
|
||||
[alertView addButtonWithTitle:NSLocalizedString(@"Confirm password", nil)
|
||||
block:^{
|
||||
NSString *password = [alertView textFieldAtIndex:0].text;
|
||||
|
|
@ -902,6 +901,11 @@ static void linphone_iphone_popup_password_request(LinphoneCore *lc, const char
|
|||
linphone_core_add_auth_info([LinphoneManager getLc], info);
|
||||
[LinphoneManager.instance refreshRegisters];
|
||||
}];
|
||||
[alertView addButtonWithTitle:NSLocalizedString(@"Go to settings", nil)
|
||||
block:^{
|
||||
SettingsView *view = VIEW(SettingsView);
|
||||
[PhoneMainView.instance changeCurrentView:view.compositeViewDescription];
|
||||
}];
|
||||
[alertView show];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 1d13688204c1cf189ba5036dcc67e5d07451d145
|
||||
Subproject commit 591a9b88b7df18f4631fa55edf232c1c6dfbdd17
|
||||
Loading…
Add table
Reference in a new issue