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) { if (avatar != null) {
intent = new Intent(getApplicationContext(), intent = new Intent(getApplicationContext(),
StartConversationActivity.class); StartConversationActivity.class);
intent.putExtra("init",true); if (xmppConnectionService != null && xmppConnectionService.getAccounts().size() == 1) {
intent.putExtra("init", true);
}
} else { } else {
intent = new Intent(getApplicationContext(), intent = new Intent(getApplicationContext(),
PublishProfilePictureActivity.class); PublishProfilePictureActivity.class);

View File

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