display phoneNumbe rwhen retrying

This commit is contained in:
Benjamin Reis 2016-11-17 16:37:48 +01:00
parent 7f780b46ae
commit c25f21c8db
2 changed files with 9 additions and 3 deletions

View file

@ -65,7 +65,6 @@
@property (weak, nonatomic) IBOutlet UILabel *accountLabel;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *createAccountNextButtonPositionConstraint;
@property(weak, nonatomic) IBOutlet UITextField *loginPhoneField;
+ (NSString *)errorForStatus:(LinphoneAccountCreatorStatus)status;
+ (NSString *)StringForXMLRPCError:(const char *)err;

View file

@ -852,8 +852,15 @@ static UICompositeViewDescription *compositeDescription = nil;
handler:^(UIAlertAction *action) {
NSString *tmp_phone =
[NSString stringWithUTF8String:linphone_account_creator_get_phone_number(account_creator)];
[self changeView:_linphoneLoginView back:TRUE animation:TRUE];
self.loginPhoneField.text = tmp_phone;
[self changeView:_linphoneLoginView back:FALSE animation:TRUE];
((UITextField *)[self findView:ViewElement_Phone
inView:_linphoneLoginView
ofType:[UIAssistantTextField class]])
.text = [tmp_phone substringFromIndex:3];
// Reset phone number in account_creator to be sure to let the user retry
linphone_account_creator_set_phone_number(account_creator,
[tmp_phone substringFromIndex:3].UTF8String,
[tmp_phone substringToIndex:3].UTF8String);
}];
[errView addAction:defaultAction];