call StartConversationActivity in init mode only after adding the first account

This commit is contained in:
Daniel Gultsch 2015-05-15 13:58:11 +02:00
parent b69ee7125d
commit b6a7e56bf6
2 changed files with 6 additions and 2 deletions

View file

@ -223,7 +223,9 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate
if (avatar != null) {
intent = new Intent(getApplicationContext(),
StartConversationActivity.class);
intent.putExtra("init",true);
if (xmppConnectionService != null && xmppConnectionService.getAccounts().size() == 1) {
intent.putExtra("init", true);
}
} else {
intent = new Intent(getApplicationContext(),
PublishProfilePictureActivity.class);

View file

@ -116,7 +116,9 @@ public class PublishProfilePictureActivity extends XmppActivity {
if (mInitialAccountSetup) {
Intent intent = new Intent(getApplicationContext(),
StartConversationActivity.class);
intent.putExtra("init",true);
if (xmppConnectionService != null && xmppConnectionService.getAccounts().size() == 1) {
intent.putExtra("init", true);
}
startActivity(intent);
}
finish();