Add check for redirect to prevent welcome screen again

This commit is contained in:
misaochan 2016-08-10 17:48:49 +12:00
parent 23aa3de53f
commit 20331c13dd
2 changed files with 6 additions and 2 deletions

View file

@ -188,10 +188,13 @@ public class LoginActivity extends AccountAuthenticatorActivity {
}); });
if (savedInstanceState == null) { if (savedInstanceState == null) {
Bundle extras = getIntent().getExtras();
if (extras == null || extras.getBoolean("redirected") == false ) {
Intent welcomeIntent = new Intent(this, WelcomeActivity.class); Intent welcomeIntent = new Intent(this, WelcomeActivity.class);
startActivity(welcomeIntent); startActivity(welcomeIntent);
} }
} }
}
private void performLogin() { private void performLogin() {
String username = usernameEdit.getText().toString(); String username = usernameEdit.getText().toString();

View file

@ -37,6 +37,7 @@ public class SignupActivity extends Activity {
// Signup success, so load LoginActivity again // Signup success, so load LoginActivity again
Log.d("SignupActivity", "Overriding URL" + url); Log.d("SignupActivity", "Overriding URL" + url);
Intent intent = new Intent(getApplicationContext(), LoginActivity.class); Intent intent = new Intent(getApplicationContext(), LoginActivity.class);
intent.putExtra("Redirected", true);
startActivity(intent); startActivity(intent);
return true; return true;
} else { } else {