mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 14:18:25 +00:00
Don't ask the user to validate the Wizard launch if no proxy is configured.
Fixes #2005
This commit is contained in:
parent
a6f850a8b7
commit
10cfee9ce2
1 changed files with 15 additions and 6 deletions
|
|
@ -672,6 +672,13 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
return hiddenKeys;
|
||||
}
|
||||
|
||||
- (void)goToWizard {
|
||||
WizardViewController *controller = DYNAMIC_CAST([[PhoneMainView instance] changeCurrentView:[WizardViewController compositeViewDescription]], WizardViewController);
|
||||
if(controller != nil) {
|
||||
[controller reset];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - IASKSettingsDelegate Functions
|
||||
|
||||
- (void)settingsViewControllerDidEnd:(IASKAppSettingsViewController *)sender {
|
||||
|
|
@ -694,6 +701,12 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
}
|
||||
#endif
|
||||
if([key isEqual:@"wizard_button"]) {
|
||||
LinphoneProxyConfig* proxy = NULL;
|
||||
linphone_core_get_default_proxy([LinphoneManager getLc], &proxy);
|
||||
if (proxy == NULL ) {
|
||||
[self goToWizard];
|
||||
return;
|
||||
}
|
||||
UIAlertView* alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Warning",nil)
|
||||
message:NSLocalizedString(@"Launching the Wizard will delete any existing proxy config.\nAre you sure to want it?",nil)
|
||||
delegate:self
|
||||
|
|
@ -736,12 +749,8 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
#pragma mark - UIAlertView delegate
|
||||
|
||||
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
|
||||
if( buttonIndex != 1 ) return;
|
||||
|
||||
WizardViewController *controller = DYNAMIC_CAST([[PhoneMainView instance] changeCurrentView:[WizardViewController compositeViewDescription]], WizardViewController);
|
||||
if(controller != nil) {
|
||||
[controller reset];
|
||||
}
|
||||
if( buttonIndex != 1 ) return; /* cancel */
|
||||
else [self goToWizard];
|
||||
}
|
||||
|
||||
#pragma mark - Mail composer for send log
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue