From ba3e6ffba2d27470c448be3c3e28c06b8932b8ee Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Thu, 15 Nov 2018 20:44:00 +0100 Subject: refactored some ManageAccount, WelcomeActivity and a few other things --- src/main/java/de/pixart/messenger/ui/EditAccountActivity.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/main/java/de/pixart/messenger/ui/EditAccountActivity.java') diff --git a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java index 3d9c0e63e..426627510 100644 --- a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java +++ b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java @@ -66,6 +66,7 @@ import de.pixart.messenger.ui.util.SoftKeyboardUtils; import de.pixart.messenger.utils.CryptoHelper; import de.pixart.messenger.utils.MenuDoubleTabUtil; import de.pixart.messenger.utils.Namespace; +import de.pixart.messenger.utils.SignupUtils; import de.pixart.messenger.utils.UIHelper; import de.pixart.messenger.utils.XmppUri; import de.pixart.messenger.xml.Element; @@ -268,8 +269,9 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat if (mAccount != null && mAccount.getStatus() != Account.State.ONLINE && mFetchingAvatar) { - //TODO: maybe better redirect to StartConversationActivity - startActivity(new Intent(this, ManageAccountActivity.class)); + Intent intent = new Intent(this, StartConversationActivity.class); + StartConversationActivity.addInviteUri(intent, getIntent()); + startActivity(intent); overridePendingTransition(R.animator.fade_in, R.animator.fade_out); finish(); } else if (mInitMode && mAccount != null && mAccount.getStatus() == Account.State.ONLINE) { @@ -301,8 +303,7 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat xmppConnectionService.deleteAccount(mAccount); } if (xmppConnectionService.getAccounts().size() == 0 && Config.MAGIC_CREATE_DOMAIN != null) { - Intent intent = new Intent(EditAccountActivity.this, WelcomeActivity.class); - WelcomeActivity.addInviteUri(intent, getIntent()); + Intent intent = SignupUtils.getSignUpIntent(this); startActivity(intent); overridePendingTransition(R.animator.fade_in, R.animator.fade_out); } @@ -398,7 +399,7 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat if (wasFirstAccount) { intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); } - WelcomeActivity.addInviteUri(intent, getIntent()); + StartConversationActivity.addInviteUri(intent, getIntent()); startActivity(intent); overridePendingTransition(R.animator.fade_in, R.animator.fade_out); finish(); -- cgit v1.2.3