aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2019-04-02 21:59:41 +0200
committerChristian Schneppe <christian@pix-art.de>2019-04-02 21:59:41 +0200
commit9103802288e4a4c1065b19b11e9905f20ac76735 (patch)
tree8a3c3ad3c14c04eb0f633b96d966d548718752db /src/main
parent8c8904f7d93a9bf5dac53b0a5fe9e11e3e3ba746 (diff)
fix account detection in EnterNameActivity
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/de/pixart/messenger/ui/EditAccountActivity.java1
-rw-r--r--src/main/java/de/pixart/messenger/ui/EnterNameActivity.java7
2 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
index f1f2912ae..bba551a6c 100644
--- a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
@@ -310,6 +310,7 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat
private void next() {
if (redirectInProgress.compareAndSet(false, true)) {
Intent intent = new Intent(this, EnterNameActivity.class);
+ intent.putExtra(EXTRA_ACCOUNT, mAccount.getJid().asBareJid().toString());
startActivity(intent);
overridePendingTransition(R.animator.fade_in, R.animator.fade_out);
finish();
diff --git a/src/main/java/de/pixart/messenger/ui/EnterNameActivity.java b/src/main/java/de/pixart/messenger/ui/EnterNameActivity.java
index ccfd88dad..eefda7df9 100644
--- a/src/main/java/de/pixart/messenger/ui/EnterNameActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/EnterNameActivity.java
@@ -12,7 +12,6 @@ import de.pixart.messenger.R;
import de.pixart.messenger.databinding.ActivityEnterNameBinding;
import de.pixart.messenger.entities.Account;
import de.pixart.messenger.services.XmppConnectionService;
-import de.pixart.messenger.utils.AccountUtils;
import de.pixart.messenger.utils.FirstStartManager;
public class EnterNameActivity extends XmppActivity implements XmppConnectionService.OnAccountUpdate {
@@ -77,8 +76,10 @@ public class EnterNameActivity extends XmppActivity implements XmppConnectionSer
@Override
void onBackendConnected() {
- this.account = AccountUtils.getFirst(xmppConnectionService);
- checkSuggestPreviousNick();
+ this.account = extractAccount(getIntent());
+ if (this.account != null) {
+ checkSuggestPreviousNick();
+ }
updateNextButton();
}