From 816b5bae58dcd0be7e92c00518b8933bdc653dda Mon Sep 17 00:00:00 2001 From: Christoph Scholz Date: Fri, 6 Apr 2018 15:42:45 +0200 Subject: [PATCH] no WelcomeActivity if MAGIC_CREATE_DOMAIN is unset --- .../java/eu/siacs/conversations/ui/EditAccountActivity.java | 2 +- .../java/eu/siacs/conversations/ui/UriHandlerActivity.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java index 0599f809d..88d970e25 100644 --- a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java @@ -312,7 +312,7 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat xmppConnectionService.deleteAccount(mAccount); } - if (xmppConnectionService.getAccounts().size() == 0) { + if (xmppConnectionService.getAccounts().size() == 0 && Config.MAGIC_CREATE_DOMAIN != null) { Intent intent = new Intent(EditAccountActivity.this, WelcomeActivity.class); WelcomeActivity.addInviteUri(intent, getIntent()); startActivity(intent); diff --git a/src/main/java/eu/siacs/conversations/ui/UriHandlerActivity.java b/src/main/java/eu/siacs/conversations/ui/UriHandlerActivity.java index 4056ce262..3e0b389a8 100644 --- a/src/main/java/eu/siacs/conversations/ui/UriHandlerActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/UriHandlerActivity.java @@ -13,6 +13,7 @@ import android.widget.Toast; import java.util.List; +import eu.siacs.conversations.Config; import eu.siacs.conversations.R; import eu.siacs.conversations.persistance.DatabaseBackend; import eu.siacs.conversations.utils.XmppUri; @@ -89,7 +90,7 @@ public class UriHandlerActivity extends AppCompatActivity { return; } - if (accounts.size() == 0) { + if (accounts.size() == 0 && Config.MAGIC_CREATE_DOMAIN != null) { intent = new Intent(getApplicationContext(), WelcomeActivity.class); WelcomeActivity.addInviteUri(intent, xmppUri); startActivity(intent);