aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2015-02-19 13:48:40 +0100
committeriNPUTmice <daniel@gultsch.de>2015-02-19 13:48:40 +0100
commit2e596c0bd4608feae238ece9edbb3ad5e7c436f4 (patch)
tree79da20c245243423f547eefda1cddae3d988a133 /src/main/java
parent77a9ddb984000b1a9a810b84bff177d44887c687 (diff)
launch edit account activity when starting Conversations for the first time (fixed regression)
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ConversationActivity.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
index 118f6dd2..9f997c86 100644
--- a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
@@ -777,6 +777,7 @@ public class ConversationActivity extends XmppActivity
updateConversationList();
if (xmppConnectionService.getAccounts().size() == 0) {
startActivity(new Intent(this, EditAccountActivity.class));
+ finish();
} else if (conversationList.size() <= 0) {
startActivity(new Intent(this, StartConversationActivity.class));
finish();
@@ -1008,13 +1009,16 @@ public class ConversationActivity extends XmppActivity
@Override
protected void refreshUiReal() {
updateConversationList();
- if (conversationList.size() == 0) {
- startActivity(new Intent(getApplicationContext(),
- StartConversationActivity.class));
+ if (xmppConnectionService != null && xmppConnectionService.getAccounts().size() == 0) {
+ startActivity(new Intent(this, EditAccountActivity.class));
+ finish();
+ } else if (conversationList.size() == 0) {
+ startActivity(new Intent(this, StartConversationActivity.class));
finish();
+ } else {
+ ConversationActivity.this.mConversationFragment.updateMessages();
+ updateActionBarTitle();
}
- ConversationActivity.this.mConversationFragment.updateMessages();
- updateActionBarTitle();
}
@Override