aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui')
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationActivity.java11
-rw-r--r--src/main/java/de/pixart/messenger/ui/XmppActivity.java3
2 files changed, 11 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationActivity.java b/src/main/java/de/pixart/messenger/ui/ConversationActivity.java
index 36940359d..975981890 100644
--- a/src/main/java/de/pixart/messenger/ui/ConversationActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ConversationActivity.java
@@ -1294,6 +1294,7 @@ public class ConversationActivity extends XmppActivity
startActivity(startConversationActivity);
} else {
switchToAccount(pendingAccount, true);
+ return;
}
finish();
}
@@ -1342,16 +1343,20 @@ public class ConversationActivity extends XmppActivity
if (xmppConnectionService.getAccounts().size() == 0) {
if (mRedirected.compareAndSet(false, true)) {
if (Config.X509_VERIFICATION) {
- startActivity(new Intent(this, ManageAccountActivity.class));
+ Intent redirectionIntent = new Intent(this, ManageAccountActivity.class);
+ redirectionIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NO_ANIMATION);
+ startActivity(redirectionIntent);
} else if (Config.MAGIC_CREATE_DOMAIN != null) {
Log.d(Config.LOGTAG, "First start time: " + FirstStartTime);
- startActivity(new Intent(this, WelcomeActivity.class));
+ Intent redirectionIntent = new Intent(this, WelcomeActivity.class);
+ redirectionIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NO_ANIMATION);
+ startActivity(redirectionIntent);
} else {
Intent editAccount = new Intent(this, EditAccountActivity.class);
editAccount.putExtra("init", true);
+ editAccount.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NO_ANIMATION);
startActivity(editAccount);
}
- finish();
}
} else if (conversationList.size() <= 0) {
if (mRedirected.compareAndSet(false, true)) {
diff --git a/src/main/java/de/pixart/messenger/ui/XmppActivity.java b/src/main/java/de/pixart/messenger/ui/XmppActivity.java
index 6808a4058..48397a75e 100644
--- a/src/main/java/de/pixart/messenger/ui/XmppActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/XmppActivity.java
@@ -537,6 +537,9 @@ public abstract class XmppActivity extends Activity {
Intent intent = new Intent(this, EditAccountActivity.class);
intent.putExtra("jid", account.getJid().toBareJid().toString());
intent.putExtra("init", init);
+ if (init) {
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NO_ANIMATION);
+ }
startActivity(intent);
}