transifex-push + fix assistant recreation of an existing account

This commit is contained in:
REIS Benjamin 2016-10-26 16:41:48 +02:00
parent 88dc05a18f
commit b72465e1de
8 changed files with 23 additions and 9 deletions

View file

@ -881,6 +881,23 @@ static UICompositeViewDescription *compositeDescription = nil;
}
}
- (void) isAccountActivated:(const char *)resp {
if (currentView != _createAccountView) {
if( linphone_account_creator_get_phone_number(account_creator) == NULL) {
[self configureProxyConfig];
[PhoneMainView.instance changeCurrentView:AssistantLinkView.compositeViewDescription];
} else {
[PhoneMainView.instance changeCurrentView:DialerView.compositeViewDescription];
}
} else {
if (!linphone_account_creator_get_username(account_creator)) {
[self showErrorPopup:"ERROR_ALIAS_ALREADY_IN_USE"];
} else {
[self showErrorPopup:"ERROR_ACCOUNT_ALREADY_IN_USE"];
}
}
}
#pragma mark - Account creator callbacks
void assistant_is_account_used(LinphoneAccountCreator *creator, LinphoneAccountCreatorStatus status, const char *resp) {
@ -943,12 +960,7 @@ void assistant_is_account_activated(LinphoneAccountCreator *creator, LinphoneAcc
AssistantView *thiz = (__bridge AssistantView *)(linphone_account_creator_get_user_data(creator));
thiz.waitView.hidden = YES;
if (status == LinphoneAccountCreatorAccountActivated) {
if( linphone_account_creator_get_phone_number(creator) == NULL) {
[thiz configureProxyConfig];
[PhoneMainView.instance changeCurrentView:AssistantLinkView.compositeViewDescription];
} else {
[PhoneMainView.instance changeCurrentView:DialerView.compositeViewDescription];
}
[thiz isAccountActivated:resp];
} else if (status == LinphoneAccountCreatorAccountNotActivated) {
if (!IPAD || linphone_account_creator_get_phone_number(creator) != NULL) {
//Re send SMS if the username is the phone number

Binary file not shown.

Binary file not shown.

View file

@ -51,7 +51,7 @@
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
_emptyView.hidden = _editButton.enabled = ([self totalNumberOfItems] != 0);
_emptyView.hidden = _editButton.enabled = ([self totalNumberOfItems] > 0);
}
- (void)toggleRowSelectionForRowAtIndexPath:(NSIndexPath *)indexPath {
@ -123,8 +123,8 @@
- (void)loadData {
[_selectedItems removeAllObjects];
[self.tableView reloadData];
_editButton.enabled = _emptyView.hidden = ([self totalNumberOfItems] > 0);
_emptyView.hidden = _editButton.enabled = ([self totalNumberOfItems] > 0);
}
- (void)removeSelectionUsing:(void (^)(NSIndexPath *indexPath))remover {

View file

@ -3,6 +3,8 @@
"Stun Server" = "Stun Server";
"ICE" = "ICE";
"TURN" = "TURN";
"TURN's Username" = "TURN's Username";
"TURN's Password" = "TURN's Password";
"Random Port" = "Random Port";
"Port" = "Port";
"Audio Port(s)" = "Audio Port(s)";