made it possible to go back to welcome screen from edit account
This commit is contained in:
parent
e6b526230a
commit
ebcb13c8eb
|
@ -315,9 +315,10 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate
|
|||
public void run() {
|
||||
final Intent intent;
|
||||
final XmppConnection connection = mAccount.getXmppConnection();
|
||||
final boolean wasFirstAccount = xmppConnectionService != null && xmppConnectionService.getAccounts().size() == 1;
|
||||
if (avatar != null || (connection != null && !connection.getFeatures().pep())) {
|
||||
intent = new Intent(getApplicationContext(), StartConversationActivity.class);
|
||||
if (xmppConnectionService != null && xmppConnectionService.getAccounts().size() == 1) {
|
||||
if (wasFirstAccount) {
|
||||
intent.putExtra("init", true);
|
||||
}
|
||||
} else {
|
||||
|
@ -325,6 +326,9 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate
|
|||
intent.putExtra(EXTRA_ACCOUNT, mAccount.getJid().toBareJid().toString());
|
||||
intent.putExtra("setup", true);
|
||||
}
|
||||
if (wasFirstAccount) {
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||
}
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
|
@ -577,8 +581,8 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate
|
|||
updateAccountInformation(true);
|
||||
}
|
||||
}
|
||||
if (this.xmppConnectionService.getAccounts().size() == 0
|
||||
|| this.mAccount == xmppConnectionService.getPendingAccount()) {
|
||||
if ((Config.MAGIC_CREATE_DOMAIN == null && this.xmppConnectionService.getAccounts().size() == 0)
|
||||
|| (this.mAccount != null && this.mAccount == xmppConnectionService.getPendingAccount())) {
|
||||
if (getActionBar() != null) {
|
||||
getActionBar().setDisplayHomeAsUpEnabled(false);
|
||||
getActionBar().setDisplayShowHomeEnabled(false);
|
||||
|
|
|
@ -28,7 +28,6 @@ public class WelcomeActivity extends Activity {
|
|||
@Override
|
||||
public void onClick(View v) {
|
||||
startActivity(new Intent(WelcomeActivity.this, EditAccountActivity.class));
|
||||
finish();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue